它占用更少的内存、uiimage和iPhone中包含文件内容的图像
我正在使用高清图像,我的内存已满。经过一段时间后,我正在使用它占用更少的内存、uiimage和iPhone中包含文件内容的图像,iphone,image,uiimage,Iphone,Image,Uiimage,我正在使用高清图像,我的内存已满。经过一段时间后,我正在使用UIImage*image=[UIImage imagename:@”“]更新我的图像,它在内存方面是否正确?[UIImage imageNamed://缓存图像。尝试改用[UIImage imageWithData:::。
UIImage*image=[UIImage imagename:@”“]更新我的图像
,它在内存方面是否正确?[UIImage imageNamed://缓存图像。尝试改用[UIImage imageWithData:::
。
缓存图像。尝试改用[UIImage imageWithData::
。是的,它正在工作。
在我们的应用程序中,我们比较了另一种方法,如
(一)
占用内存22 mb
(二)
占用内存15mb
非常感谢是的,它正在工作。
在我们的应用程序中,我们比较了另一种方法,如
(一)
占用内存22 mb
(二)
占用内存15mb
非常感谢更多信息:更多信息:
[self.view setBackgroundColor:[UIColor colorWithPatternImage:
[UIImage imageWithContentsOfFile:[
[NSBundle mainBundle] pathForResource:@"mainScreenBackground" ofType:@"png"]]]];
[self.view setBackgroundColor:[UIColor colorWithPatternImage:
[UIImage imageWithData:
[NSData ] pathForResource:@"mainScreenBackground" ofType:@"png"]]]];