iOS关闭单页自动轮播iPad不起作用?
iOS Close single-page automatic rotation iPad does not work?
需求:就是单页不能自动旋转,去横屏外面一直进来横屏,竖屏外面进来保持竖屏。
Action: 在这个页面的controller中写shouldautorotate方法returns NO,发现work for all iphone都达到了需求,但是iPad没有working.
注意:请看,没有自动旋转的是单一的特定页面,这是为了保证程序设置页面在几个方向都被勾选,快捷菜单下拉装置保证打开自动旋转.
系统:iOS9
我有一个类似的案例。请注意,我没有使用导航控制器,它是一个简单的模态视图,这可能会影响旋转代码。
第一次查看我的申请时:
-(BOOL)shouldAutorotate {
return YES;
}
鉴于我想锁定某个方向(在我的情况下是横向),我没有使用 shouldAutorotate 但使用了这个:
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
需求:就是单页不能自动旋转,去横屏外面一直进来横屏,竖屏外面进来保持竖屏。
Action: 在这个页面的controller中写shouldautorotate方法returns NO,发现work for all iphone都达到了需求,但是iPad没有working.
注意:请看,没有自动旋转的是单一的特定页面,这是为了保证程序设置页面在几个方向都被勾选,快捷菜单下拉装置保证打开自动旋转.
系统:iOS9
我有一个类似的案例。请注意,我没有使用导航控制器,它是一个简单的模态视图,这可能会影响旋转代码。
第一次查看我的申请时:
-(BOOL)shouldAutorotate {
return YES;
}
鉴于我想锁定某个方向(在我的情况下是横向),我没有使用 shouldAutorotate 但使用了这个:
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}