
//iOS6-(BOol)shouldautorotate{ return NO;}-(NSUInteger)supportedInterfaceOrIEntations{ return (UIInterfaceOrIEntationLandscapeRight | UIInterfaceOrIEntationLandscapeleft);}- (UIInterfaceOrIEntation)preferredInterfaceOrIEntationForPresentation{ return UIInterfaceOrIEntationLandscapeRight;} 错误:
解决方法 您的代码应如下所示:Terminating app due to uncaught exception
‘UIApplicationInvalIDInterfaceOrIEntation’,reason:
‘preferredInterfaceOrIEntationForPresentation must return a supported
interface orIEntation!’
-(BOol)shouldautorotate{ return NO;}-(NSUInteger)supportedInterfaceOrIEntations{ return UIInterfaceOrIEntationMaskLandscape;}- (UIInterfaceOrIEntation)preferredInterfaceOrIEntationForPresentation{ return UIInterfaceOrIEntationLandscapeRight;} 此外,确保在Info.pList中为应用程序设置了正确的方向,因为从supportedInterfaceOrIEntations返回的内容与Info.pList相交,如果它找不到一个常见的,那么您会得到该错误。
总结以上是内存溢出为你收集整理的ios – preferredInterfaceOrientationForPresentation必须返回支持的接口方向全部内容,希望文章能够帮你解决ios – preferredInterfaceOrientationForPresentation必须返回支持的接口方向所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)