【问题标题】:Intermittent iPad app crashing?间歇性 iPad 应用程序崩溃?
【发布时间】:2014-09-15 12:17:08
【问题描述】:

我正在使用拆分视图控制器为 iPad 构建文章阅读应用程序。 我面临应用程序间歇性崩溃的问题,并且控制台中没有错误。 有时应用程序在更改方向时崩溃,有时它运行良好。

【问题讨论】:

    标签: ios objective-c ipad exception orientation


    【解决方案1】:

    如果您的应用程序在改变方向时崩溃,那么您必须在控制器中添加以下方法。

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
    

    它会解决你的问题

    【讨论】:

    • 谢谢,应用此方法后应用程序仍然崩溃。我应用了此详细视图控制器类。 -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return YES; }
    • 请在每个控制器中添加此方法,请检查一次
    • @Vipul,我在所有课程中都添加了,但它不起作用。
    猜你喜欢
    • 1970-01-01
    • 2021-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-14
    • 1970-01-01
    • 2012-12-31
    相关资源
    最近更新 更多