线程: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];
    });

你可能感兴趣的:(线程: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)