Fre*_*all 11 iphone objective-c uiinterfaceorientation ios
我有
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
Run Code Online (Sandbox Code Playgroud)
在info.plist中并进行搜索并设置shouldAutorotateToInterfaceOrientation要返回的每个实例YES.但在iPhone上它表现得好像不支持颠倒.UpsideUp肖像作品,风景作品,上下颠倒显示风景.为什么?
iPad适用于所有方向.他们分享.xibs
UPDATE
我已经补充说了
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
Run Code Online (Sandbox Code Playgroud)
在每一个现有的实例之后shouldAutorotateToInterfaceOrientation,仍然没有爱.
我的目标是iOS 4.3,但我的模拟器和物理设备运行iOS 6
根据你已经尝试过的内容需要一些更多的背景?您是否使用基于NIB的设置与导航控制器,标签栏控制器或类似的东西?如果是这样,你需要添加一个类别来支持它,因为你不能在NIB中覆盖这些类的实现(或者一般)
谈到iPhone 5,但问题实际上与iOS6有关.
| 归档时间: |
|
| 查看次数: |
7016 次 |
| 最近记录: |