大佬教程收集整理的这篇文章主要介绍了ios – _viewControllerForSupportedInterfaceOrientationsWithDismissCheck无法识别的选择器,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
如果我然后使用SLComposeViewController(用于Twitter发布),一旦我解雇(取消或发布的东西)然后旋转手机横向,应用程序崩溃与以下错误;
虽然我不使用横向模式,但当我将其转向横向时,该应用确实会转向,但这不是主要问题,问题是应用程序崩溃.
虽然我知道如果用户在发布到Twitter之后没有转动手机会很好,但这并不理想,我宁愿修复,因为我相信你同意.
关于方向支持,AppDelegate.m有这个;
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskLandscape|UIInterfaceOrientationMaskPorTrait |UIInterfaceOrientationMaskPorTraitUpsideDown; }
崩溃的控制器有这个;
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { NSString *viewControllerClassName = [NSString StringWithUTF8String:object_getClassName(window.rootViewController)]; if ([viewControllerClassName isEqualToString:@"_UIAlertShimPresenTingViewController"]) { return UIInterfaceOrientationMaskPorTrait; } else { return UIInterfaceOrientationMaskPorTrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight; } } -(BOOL)shouldAutorotate{ return NO; }
以上是大佬教程为你收集整理的ios – _viewControllerForSupportedInterfaceOrientationsWithDismissCheck无法识别的选择器全部内容,希望文章能够帮你解决ios – _viewControllerForSupportedInterfaceOrientationsWithDismissCheck无法识别的选择器所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。