【问题标题】:iOS 8- viewController my_shouldAutorotate crash while presentViewControlleriOS 8-viewController my_shouldAutorotate 在 presentViewController 时崩溃
【发布时间】:2014-10-09 08:28:57
【问题描述】:

我使用 Uinavigationcontroller 作为 Windows 根视图控制器。在其他一些视图中,我正在展示视图控制器,但我的应用程序在 iOS 8 中崩溃。它在 ios7 中运行完美。它说

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[InfoVC my_shouldAutorotate]: unrecognized selector sent to instance 0x15cd42780'.  

其中 InfoVC 是视图控制器。什么是 my_shouldAutorotate

【问题讨论】:

  • 在 InfoVC 类中编写以下方法:-(BOOL)shouldAutorotate{ return NO; }
  • 谢谢@CnchalRaj...我想知道你为什么不把这个作为答案发布。

标签: uiviewcontroller uinavigationcontroller crash ios8 presentviewcontroller


【解决方案1】:

在您的 InfoVC 类中编写以下方法: -(BOOL)shouldAutorotate{ return NO; }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-27
    • 1970-01-01
    • 1970-01-01
    • 2015-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多