横竖屏。

plist文件

UISupportedInterfaceOrientationsUIInterfaceOrientationPortraitUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRightUISupportedInterfaceOrientations~ipadUIInterfaceOrientationPortraitUIInterfaceOrientationPortraitUpsideDownUIInterfaceOrientationLandscapeLeftUIInterfaceOrientationLandscapeRight


在需要横屏的前一页

-(BOOL)shouldAutorotate{

return YES;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskPortrait;

}



需要横屏的当前页


-(BOOL)shouldAutorotate{

return YES;

}

//

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskLandscapeLeft;

}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{

return UIInterfaceOrientationLandscapeLeft;

}

你可能感兴趣的:(横竖屏。)