1.用SDWebImage为UIImageView加载图片时遇到的问题

来源:互联网 发布:淘宝代运营认证 编辑:程序博客网 时间:2024/06/13 21:05

Aug 18 17:39:10 Health[5150] :
CGContextDrawImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Aug 18 17:39:10 Health[5150] :
CGBitmapContextCreateImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Aug 18 17:39:10 Health[5150] :
CGContextDrawImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Aug 18 17:39:10 Health[5150] :
CGBitmapContextCreateImage: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
问题说明:
CGContextDrawImage; CGBitmapContextCreateImage;
If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
如果你想看到BACKTRACE,请设置CG_CONTEXT_SHOW_BACKTRACE环境变量。

解决办法:
在SDWebImageDecoder.h的类方法里加入
if (image == nil) {
return image;
}。

0 0
原创粉丝点击