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

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;
}。

你可能感兴趣的:(1.用SDWebImage为UIImageView加载图片时遇到的问题)