LGPhotoBrowser 网络请求图片 报出This application is modifying the autolayout engine from a background thread
2016-08-31 11:51
537 查看
由于自己水平有限 在项目中集成了一个大牛写的仿微信的拍照 相册 图片游览器 集合的开源api LGPhotoBrowser 那么问题就来了 可能是没有更新到最新api吧 后面有时间再去仔细研究
切入正题
项目中需要做 点击web 界面上的图片是 可以实现放大多张查看的功能 其实就是要做一个url的图片游览器
集成很简单
![](http://img.blog.csdn.net/20160901090506850)
但是 在获取网络图片的时候 报出了这个
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.
![](http://img.blog.csdn.net/20160901090601191)
当时一脸的懵呆 于是 查找代码啊 谷歌大婶啊 那么问题就来了
ios9里触发js方法使用时,遇到了这个问题,代码如下:
找了下资料说写在GCD里就没问题,修改如下:
这样就没问题了,看来ios9里坑不少。
网址链接
http://blog.csdn.net/quanqinyang/article/details/49516593
以上是另一位大牛写的 自己也遇到过这样的问题 贴上差异代码
1 原生态的
![](http://img.blog.csdn.net/20160901091206131)
2 改后的
![](http://img.blog.csdn.net/20160901091232131)
于是 问题就决绝了 哈哈哈哈哈哈 还是楼上大神那句话 看来ios9里坑不少啊。
切入正题
项目中需要做 点击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里坑不少啊。
相关文章推荐
- This application is modifying the autolayout engine from a background thread, which can lead to engi
- iOS 错误信息 This application is modifying the autolayout engine from a background thread...
- 芒果iOS开发之This application is modifying the autolayout engine from a background thread崩溃
- warning:This application is modifying the autolayout engine from a background thread
- 更换NSURLSession后 报错 This application is modifying the autolayout engine from a background thread, whi
- This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.
- iOS - 解决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, which can lead t
- 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
- xcode7 ios9 处理警告 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
- iOS之崩溃处理: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 engine corruption and weird crashes
- 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
- This application is modifying the autolayout engine from a background thread after 。。。