Ech*_*lon 2 iphone uiinterfaceorientation ios auto-rotation
我正在尝试为我的应用添加自动旋转,但有困难.我可以调整所有内容(TableView和一些标签),但状态栏和我的窗口的其余部分(例如:标签栏和导航控制器)仍然是纵向.我有一个从窗口到顶部ViewController的三个视图heirarchy,我将所有内容shouldAutorotateToInterfaceOrientation设置为YES,除了Summary在目标属性的部分中选择了倒置,但它拒绝让步.这种情况发生在模拟器和iPhone 4上.在XCode 4上都是4.3.我已经在视图方向上搜索了苹果文档,但是我还需要设置其他地方吗?
在我Info.plist,我有以下内容:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
Run Code Online (Sandbox Code Playgroud)
我最终发现,如果你有一个UITabBarController,所有的选项卡视图都需要支持旋转.应该通过记住来节省一些时间:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration方法中手动调整大小| 归档时间: |
|
| 查看次数: |
1205 次 |
| 最近记录: |