您的位置:首页 > 移动开发

This application is modifying the autolayout engine from a background thread, which can lead to engi

2016-03-24 15:27 567 查看
原因:在线程中进行了UI操作,比如弹出警告框,alloc UI元素。

解决方法:

1,使用GCD在主线程进行UI操作:

dispatch_async(dispatch_get_main_queue(), ^{
               
//UI 相关的操作
            });
2,self.automaticallyAdjustsScrollViewInsets = NO;  // 不推荐使用
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  autolayout 主线程