简体   繁体   English

iOS模拟器风景肖像

[英]iOS simulator Landscape Portrait

I have a iOS application which has been build on XCode earlier iOS 5 and supports the Landscape left , Landscape right and portrait (bottom home ) and from the info.plist --> support interface orientation --> 1 landscape(right home button) 2 landscape(left home button) 3 portrait (bottom home ) to flow of the opening app 我有一个iOS应用程序,该应用程序是在XCode早期的iOS 5上构建的,并且支持`` Landscape left , Landscape right and portrait (bottom home ) info.plist Landscape left , Landscape right and portrait (bottom home ) info.plist Landscape left , Landscape right and portrait (bottom home ) 1 landscape(right home button) 2 landscape(left home button) 3 portrait (bottom home )以及从info.plist > support interface orientation -> 1 landscape(right home button) 2 landscape(left home button) 3 portrait (bottom home )到打开应用程序的流程

Means simulator will open landscape(right home button) by default.. 意味着模拟器默认情况下会打开landscape(right home button)

but problem is when I run app in simulator iOS 5.0 --> landscape(right home button) opens by default . 但是问题是我在模拟器iOS 5.0运行应用程序时->默认情况下会打开landscape(right home button)

but when i run app in simulator iOS 6.1 --> Portrait mode opens by default. 但是当我在模拟器iOS 6.1运行应用程序时-> Portrait mode opens by default.

why iOS 6.1 simulator is opening the Portrait mode when I have set landscape(right home button) to open by default. 为什么我将landscape(right home button)默认为landscape(right home button)设置为默认打开时,iOS 6.1模拟器会打开人像模式。

is there any issue with the base SDK or anything..as I was building on the earlier versions of the iOS. 基本的SDK或任何其他东西都没有问题。.当我在iOS的早期版本上构建时。

The way interface orientations are handled changed in iOS 6. The two main methods to look into are as below : 在iOS 6中更改了界面方向的处理方式。要研究的两种主要方法如下:

-(NSUInteger)supportedInterfaceOrientations

and

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation

both declared in UIViewController . 两者都在UIViewController声明。

I'd recommend to read View Controller Programming Guide - Supporting Multiple Interface Orientations 我建议阅读《 View Controller编程指南-支持多种接口方向》

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM