因为我需要一个更自定义的UIAlertView,我正在使用。我的问题在于它可以使设备在任何方向上旋转,即使我已禁用它。
在AlertView出现之前,横向模式已停用,但当我调用show时,任何方向都可以。
这里发生了什么?我对UIAlertView没有这种行为。
答案 0 :(得分:0)
转到@implementation TSAlertViewController
并检查shouldAutorotateToInterfaceOrientation
@implementation TSAlertViewController
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return NO;
}