您执行此操作的最佳方法是将 APP 摘要中的支持方向更改为您喜欢的方向(纵向方向)。
然后您可以处理其他页面方向委托方法。
-(BOOL)shouldAutorotate{
return YES;
}
-(NSInteger)supportedInterfaceOrientations{ NSInteger 掩码 = 0; if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeRight]) 掩码 |= UIInterfaceOrientationMaskLandscapeRight; if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeLeft]) 掩码 |= UIInterfaceOrientationMaskLandscapeLeft; if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationPortrait]) 掩码 |= UIInterfaceOrientationMaskPortrait; if ([self shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationPortraitUpsideDown]) 掩码 |= UIInterfaceOrientationMaskPortraitUpsideDown; 返回掩码;}