横竖屏的问题

在要横屏的前一页VC:

-(BOOL)shouldAutorotate{

return YES;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskPortrait;

}


在横屏的当前页:

-(BOOL)shouldAutorotate{

return YES;

}

//

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

return UIInterfaceOrientationMaskLandscapeLeft;

}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{

return UIInterfaceOrientationLandscapeLeft;

}



横竖屏的问题_第1张图片

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