在 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/