[英]TSAlertView enables device rotation
Because I needed a more custom UIAlertView, I'm using. 因为我需要更多自定义UIAlertView,所以我正在使用。 My problem ist that it enables the device rotation in any direction, even if I have disabled it. 我的问题是,即使禁用了它,它也可以使设备向任何方向旋转。
Before the AlertView shows up, the Landscape Mode is deactivated, but when I call show, any direction is possible. 在AlertView出现之前,横向模式已停用,但是当我调用show时,任何方向都是可能的。
What's going on here? 这里发生了什么? I don't have this behavior with a UIAlertView. 我没有UIAlertView的这种行为。
Go to @implementation TSAlertViewController
and check shouldAutorotateToInterfaceOrientation
转到@implementation TSAlertViewController
和检查shouldAutorotateToInterfaceOrientation
@implementation TSAlertViewController
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return NO;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.