iOS开发——modifying the autolayout engine from a background thread
很多时候,我们需要用到多线程的东西,比如红外线检测是否有人经过。这种情况需要搞个子线程在后台不断的检测,这个线程可能是第三方提供的,你调用它给的方法,然后显示提示框的时候,问题就来了。
提示信息:This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
复杂、耗时的操作需要放在子线程,这样不会堵塞主线程的操作。但是,与UI相关的操作,必须回到主线程中执行。
方法如下:
dispatch_async(dispatch_get_main_queue(), ^{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"侦测到门前有人!" message:nil delegate:nil cancelButtonTitle:@"NO" otherButtonTitles:@"YES", nil];
[alertView show];
});
iOS开发——modifying the autolayout engine from a background thread的更多相关文章
- iOS 报错:(子线程中更新UI)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.
今天在写程序的时候,使用Xcode 运行工程时报出下面的错误错信息,我还以为是什么呢,好久没遇到过这样的错误了. **ProjectName[1512:778965] This application ...
- iOS之崩溃处理:This application is modifying the autolayout engine from a background thread
一.错误提示 今天在开发的时候遇到一个崩溃问题,"This application is modifying the autolayout engine from a background ...
- This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.
-- :::] This application is modifying the autolayout engine from a background thread, which can lead ...
- warning:This application is modifying the autolayout engine from a background thread
警告提示:This application is modifying the autolayout engine from a background thread, which can lead to ...
- APP崩溃提示: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.
崩溃输出日志 2017-08-29 14:53:47.332368+0800 HuiDaiKe[2373:1135604] This application is modifying the auto ...
- This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
一,经历 <1> 使用SDWebImage下载 成功图片后,将图片设置给 self.imageView.image,提示如题所示的错误提示. <2>第一反应就是慢慢注释掉代码进 ...
- This application is modifying the autolayout engine from a background threa-线程错误
警告提示:This application is modifying the autolayout engine from a background thread, which can lead to ...
- iOS开发——使用基于Autolayout的ScrollView
问题描述: 在使用Autolayout布局方式对ScrollView进行布局时,如果你想做一个可以垂直方向滚动的九宫格类似这样: 拿一行来说,一定不要想当然的尝试去给一行图标进行均匀排列的操作(指 ...
- iOS开发小技巧
1. 解析详情页(是webView)遇到的3个问题: 1.图片太大,超出屏幕范围 2.怎么在webView上面添加一行文字 3.文字太小 1.解决方法 webView.scalesPageToFit ...
随机推荐
- 单元测试、自动化测试、接口测试过程中的Excel数据驱动(java实现)
import java.io.FileInputStream;import java.io.InputStream;import java.util.HashMap;import java.util. ...
- initWithFrame、initWithCoder、awakeFromNib的区别和调用次序 & UIViewController生命周期 查缺补漏
当我们创建或者自定义一个UI控件时,就很可能会调用awakeFromNib.initWithCoder .initWithFrame这些方法.三者的具体区别如下: initWithFrame: 通过代 ...
- eclipse背景颜色修改插件color theme
对于长时间编码的程序猿来说,这个插件可以说是福音了. 安装方式有两种: 1.可以直接在eclipse的eclipse marketplace 那里搜索安装 2.可以在Help->Install ...
- 在win7 64bit系统安装QC软件
当本机系统不再QC软件支持的系统上,可以在setup右键选择兼容性选择能支持安装的系统, 在JBOSS页面,选择该服务器,用户名输入本机的用户名和密码,如果没有配置域输入计算机名. 如果没有装IIS, ...
- Python -- OOP高级 -- 定制类
__str__ 和 __repr__ :实例对象直接显示字符串 class Student: def __init__(self, name): self.name = name def __str_ ...
- SVM支持向量机算法
支持向量机(SVM)是另一类的学习系统,其众多的优点使得他成为最流行的算法之一.其不仅有扎实的理论基础,而且在许多应用领域比大多数其他算法更准确. 1.线性支持向量机:可分情况 根据公式(1)< ...
- Android平台设计规范整理(尺寸+组成元素+字体+滑块)
转自:http://www.ui.cn/project.php?id=12394
- sublime使用方法
一.sublime菜单简介[常用功能及快捷键] [Edit菜单] 1.line行操作快捷键 ctrl+] 增加缩进 ctrl+[ 减小缩进 ctrl+shift+D 复制当前行 ctrl+shift+ ...
- JSP文件上传--FileUpload组件
如果使用上传操作,并且没有使用框架之类,最好使用Smartupload,因为FileUpdate太难使用. 下载组件: fileupload包:http://commons.apache.org/pr ...
- wind7系统修改host
http://jingyan.baidu.com/article/e5c39bf56564a539d7603312.html 由于软件注册的原因,我需要更改hosts文件来防止服务器验证!那么在我们修 ...