美文网首页
横竖屏。

横竖屏。

作者: 兔Hio | 来源:发表于2016-09-23 15:23 被阅读17次

plist文件

UISupportedInterfaceOrientationsUIInterfaceOrientationPortraitUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRightUISupportedInterfaceOrientations~ipadUIInterfaceOrientationPortraitUIInterfaceOrientationPortraitUpsideDownUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRight

在需要横屏的前一页

-(BOOL)shouldAutorotate{

return YES;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskPortrait;

}

需要横屏的当前页

-(BOOL)shouldAutorotate{

return YES;

}

//

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskLandscapeLeft;

}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{

return UIInterfaceOrientationLandscapeLeft;

}

相关文章

网友评论

      本文标题:横竖屏。

      本文链接:https://www.haomeiwen.com/subject/hwvtyttx.html