iPhone模拟器横向纵向
问题描述:
我有一个iPhone应用程序,其已经建立在较早的XCode iOS 5及支撑Landscape left , Landscape right and portrait (bottom home)
并从info.plist
- >support interface orientation
- >1 landscape(right home button) 2 landscape(left home button) 3 portrait (bottom home)
流动开口应用的iPhone模拟器横向纵向
手段模拟器将打开landscape(right home button)
默认情况下。
但问题是当我在模拟器中运行应用程序iOS 5.0
- >landscape(right home button)
默认打开。
,但是当我在模拟器iOS 6.1
运行的应用程序 - >Portrait mode opens by default.
为什么的iOS 6.1模拟器开启人像模式时,我已经设置landscape(right home button)
默认打开。
是否有任何问题与基本的SDK或任何..因为我在早期版本的iOS上构建。
答
接口方位的处理方式中的iOS 6的两个主要方法改为看看情况如下:
-(NSUInteger)supportedInterfaceOrientations
和
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
在UIViewController
这两个声明。
我建议你阅读View Controller Programming Guide - Supporting Multiple Interface Orientations
雅做了同样的...在'supportedInterfaceOrientations - > UIInterfaceOrientationLandscapeLeft?| UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationMaskPortrait'和'preferredInterfaceOrientationForPresentation {UIInterfaceOrientationLandscapeRight}',但仍然默认ios 6.1模拟器打开纵向视图 – user2353519 2013-05-07 06:43:39