iphone - 在 iPad 上横向启动应用程序

标签 iphone ipad

在 iPad 上横向启动应用程序时面临一个问题。 我开发了iPhone应用程序,后来移植到了iPad上。

我已经在 info.plist 中进行了有关方向的设置

[ UISupportedInterfaceOrientations~ipad ] to support all orientation UIInterfaceOrientationPortrait , UIInterfaceOrientationPortraitUpsideDown , UIInterfaceOrientationLandscapeLeft , UIInterfaceOrientationLandscapeRight.

但是当我在横向模式下启动 iPad 应用程序时,它总是以纵向模式启动。

沿着这个

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{ return YES; }

帮助我,如果我遗漏了一些东西..

谢谢

萨加尔

最佳答案

我还发现了一些事情:如果您在第一个插槽中设置了支持的界面方向和另一个方向,则在 info.plist 中设置初始界面方向将被忽略!将您的初始方向也放在那里 - 模拟器将正确启动,应用程序也将正确启动。这让我发疯了很长一段时间!

关于iphone - 在 iPad 上横向启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2947501/

相关文章:

iphone - 有没有办法在 iOS 上运行脚本?

iphone - MKMapView 自定义图像不工作

ios - 相当于 transaction.transactionReceipt.bytes

iphone - 使用 NSLayoutManager 计算每个字形的帧

iphone - iphone如何判断当前年份是否闰年

jquery - iPad 应用程序在我的包装 HTML 上表现奇怪

cocoa-touch - 我如何在 Cocoa 中区分 iPad 1 和 iPad 2?

iphone - 设计 Omniauth 和 Iphone/Android 应用程序

iphone - iOS 7 中的 slim 系统字体叫什么名字?

ios - 在 UIPageView 后面移动背景