133*_*ode 1 iphone landscape orientation ipad ios
我在StoryBoard中有UISplitViewController,它是初始视图,我希望该应用程序仅在横向模式下工作.
我只限制了横向方向,甚至将横向界面方向设置为横向(右侧主页按钮).
在iOS 6中,一切正常,它只显示主视图和详细视图,但在iOS 5中它停留在纵向模式,只显示详细信息视图.
请帮我这个,我坚持了2个小时......
您需要shouldAutorotateToInterfaceOrientation在包含在以下内容中的视图控制器中实现UISplitViewController:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
783 次 |
| 最近记录: |