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 

posted @ 2013-09-04 16:34  韦韦韦  阅读(286)  评论(0)    收藏  举报