横竖屏。

2016-09-23  本文已影响17人  兔Hio

plist文件

UISupportedInterfaceOrientationsUIInterfaceOrientationPortraitUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRightUISupportedInterfaceOrientations~ipadUIInterfaceOrientationPortraitUIInterfaceOrientationPortraitUpsideDownUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRight

在需要横屏的前一页

-(BOOL)shouldAutorotate{

return YES;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskPortrait;

}

需要横屏的当前页

-(BOOL)shouldAutorotate{

return YES;

}

//

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskLandscapeLeft;

}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{

return UIInterfaceOrientationLandscapeLeft;

}

上一篇下一篇

猜你喜欢

热点阅读