0
我正在使用iPad应用程序,该应用程序仅限于info.plist文件中的横向(右和左)以及项目设置。这对iOS 6和7工作正常,但当设备移动到肖像(应用程序移动到肖像也)时,iOS 5无法正常工作。我Google搜索,然后添加代码。 in App delegate:无法将应用程序限制在仅适用于iPad 5的横向模式中
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window // iOS 6 autorotation fix
{
return UIInterfaceOrientationMaskLandscape;
}
在每个视图控制器中。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscape;
}
但是唉,仍然面临同样的问题。我GOOGLE了太多,但没有任何帮助。请在此引导我。如何完成这项任务。谢谢。
我很高兴你找到了解决方案,但人,iOS5?我试图围绕支持iOS5的商业案例... –
抱歉,迟到的回复,这个问题只是在我处理的iOS 5中,我很好地看到我的答案,并仔细阅读。希望你能得到答案。谢谢。 – josh
哦,我看到它是iOS5。我只是想了解为什么你需要支持iOS5 –