您的位置:首页 > 大数据 > 人工智能

"may only be called from the main thread"

2015-10-13 17:14 603 查看
此bug发生是因为目前的进程中有更新UI的操作但是没有在主线程中进行所引起的,

所以简单的方法是使用gcd切换主线程进行UI更新

//UI更新需要在主线程
dispatch_async(dispatch_get_main_queue(), ^
{
[weakLoginAnimated removeFromSuperview];

});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: