美文网首页
IOS添加页面,会出现线程错误

IOS添加页面,会出现线程错误

作者: 无聊之人1123 | 来源:发表于2017-09-25 15:00 被阅读0次

    This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.

    出现该问题的原因是没有回归到主线程,需要在加

    dispatch_async(dispatch_get_main_queue(),^{

    //你要写的代码

    });

    相关文章

      网友评论

          本文标题:IOS添加页面,会出现线程错误

          本文链接:https://www.haomeiwen.com/subject/lpqdextx.html