-[UIImage _isCached]: message sent to deallocated instance 0xde8ce90

来源:互联网 发布:最新的群智能算法 编辑:程序博客网 时间:2024/06/05 08:58

当你测试内存警告的时候,可能会遇到这种提示,这说明,你的代码里加载图片的用的是:

UIImage *image = [UIImage imageNamed:@"btn1.png"];

你应该是这样用:

    NSString* imagePath = [[NSBundle mainBundle] pathForResource:@"shujia" ofType:@"png"];    UIImage* back = [UIImage imageWithContentsOfFile:imagePath];




也可看看这位大神是怎么弄的:http://blog.csdn.net/jxncwzb/article/details/6662826

原创粉丝点击