UIImage转换UIColor内存会莫名增大可以试试另一种方法

一般我们会用此方法加载被背景图片

[self.view setBackgroundColor:[UIColor colorWithPatternImage:[[UIImage alloc]initWithContentsOfFile:App_ContentFile(@"xxx", @"png")]]];

但是有时候会发现内存变大的离谱,再给self.view设置背景时候可以用UIImageView:

self.view = [[UIImageView alloc] init];

还有一种方法也许会帮到你:

self.view.layer.contents = (id)image.CGImage

上一篇:46黑名单显示的bug---(优化ListView)convertView复用带来的问题


下一篇:OpenJudge计算概论-最长平台