[英]Orientation not changing on device
我同时支持LandscapeLeft和landscapeRight方向
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}
但是landscapeRight的方向并没有改变。 我添加了观察者以检测方向更改事件,这些事件被调用,但是对于landscapeRight模式,statusBar和导航栏不会更改。
加
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
您有TYPO而不是
UIInterfaceOrientationMaskLandscapeRight
你有
UIInterfaceOrientationLandscapeRight
检查是否在项目设置中选中了它的方向支持。 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.