LGPhotoBrowser 网络请求图片 报出This application is modifying the autolayout engine from a background thread
来源:互联网 发布:js导出文本格式 编辑:程序博客网 时间:2024/06/05 18:09
由于自己水平有限 在项目中集成了一个大牛写的仿微信的拍照 相册 图片游览器 集合的开源api LGPhotoBrowser 那么问题就来了 可能是没有更新到最新api吧 后面有时间再去仔细研究
切入正题
项目中需要做 点击web 界面上的图片是 可以实现放大多张查看的功能 其实就是要做一个url的图片游览器
集成很简单
但是 在获取网络图片的时候 报出了这个
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.
当时一脸的懵呆 于是 查找代码啊 谷歌大婶啊 那么问题就来了
ios9里触发js方法使用时,遇到了这个问题,代码如下:
self.context[@"sendMoney"] = ^(NSString *str){ NSLog(@"--sendMoney----%@",str); [weakSelf pushViewController:@"TradeViewController" withArgment:nil]; };
找了下资料说写在GCD里就没问题,修改如下:
self.context[@"sendMoney"] = ^(NSString *str){ NSLog(@"--sendMoney----%@",str); dispatch_async(dispatch_get_main_queue(), ^{ [weakSelf pushViewController:@"TradeViewController" withArgment:nil]; }); };
这样就没问题了,看来ios9里坑不少。
网址链接
http://blog.csdn.net/quanqinyang/article/details/49516593
以上是另一位大牛写的 自己也遇到过这样的问题 贴上差异代码
1 原生态的
2 改后的
于是 问题就决绝了 哈哈哈哈哈哈 还是楼上大神那句话 看来ios9里坑不少啊。
0 0
- LGPhotoBrowser 网络请求图片 报出This application is modifying the autolayout engine from a background thread
- This application is modifying the autolayout engine from a background thread after the engine was ac
- iOS9 This application is modifying the autolayout engine from a background thread, which
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- iOS9 This application is modifying the autolayout engine from a background thread, which
- iOS 错误信息 This application is modifying the autolayout engine from a background thread...
- This application is modifying the autolayout engine from a background thread...
- 崩溃问题:iOS9 This application is modifying the autolayout engine from a background thread, which
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- "This application is modifying the autolayout engine from a background thread, which can lead to en
- 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 engi
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- 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 t
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- warning:This application is modifying the autolayout engine from a background thread
- js sleep 实现等待 setTimeOut
- 5-52 两个有序链表序列的交集 (20分)
- js基础
- 记一次基于mssql的入侵
- 块级元素在块级别元素中居中
- LGPhotoBrowser 网络请求图片 报出This application is modifying the autolayout engine from a background thread
- 关于spark利用jar包跑job的一些总结(二)
- 欢迎使用CSDN-markdown编辑器
- C# 重构之五(移除参数重构)
- ZooKeeper编程(一)
- Effecticve学习笔记_条款46:需要类型转换时请为模板定义非成员函数
- spring自定义注解,防止页面重复提交
- 乐观锁与悲观锁(多线程)
- redmine 迁移到新版本