Abh*_*ram 0 cocoa-touch uiinterfaceorientation ios auto-rotation ios6
如何在我的应用程序的每个视图控制器上禁用自动旋转?我希望每个视图/屏幕只能在纵向模式下查看,如果手机旋转,我不希望我的视图控制器转换到横向模式.我该怎么做呢?我在网上看到了太多令人困惑的解释/教程.我在特定的视图控制器上尝试了以下代码,它没有帮助,视图仍然旋转
- (NSInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (BOOL) shouldAutorotate {
return YES;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
176 次 |
| 最近记录: |