线程:This application is modifying the autolayout engin from a background thread,which can lead to engine corruption and weird crashes,This will cause an exception in a future rellease

问题描述:

在进行tableview刷新列表操作过程中出现问题:This application is modifying the autolayout engin from a background thread,which can lead to engine corruption and weird crashes,This will cause an exception in a future rellease.

原因分析:

可能因为是异步获取数据后(融云的即时通讯消息),在子线程中直接刷新列表数据造成。

解决方法:

在获取数据后,在主线程中刷新列表。
从别的线程中拿到数据源后,必须回到主线程中更新数据和UI。

dispatch_async(dispatch_get_main_queue(), ^{
        [msgTabView reloadData];
    });
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容