TSAlertView支持设备旋转

时间:2011-12-16 22:57:29

标签: objective-c ios rotation uialertview

因为我需要一个更自定义的UIAlertView,我正在使用。我的问题在于它可以使设备在任何方向上旋转,即使我已禁用它。

在AlertView出现之前,横向模式已停用,但当我调用show时,任何方向都可以。

这里发生了什么?我对UIAlertView没有这种行为。

1 个答案:

答案 0 :(得分:0)

转到@implementation TSAlertViewController并检查shouldAutorotateToInterfaceOrientation

@implementation TSAlertViewController
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return NO;
}