Reproduced:
Http://www.cnblogs.com/easonoutlook/archive/2012/12/17/2821648.html (from Easonoutlook)
[UIImage imagenamed:] Only suitable for the reading of the map with the UI interface, and some of the larger resource files should try to avoid using this interface.
Read the file path directly [UIImage Imagewithcontentsoffile] to solve the picture reading problem
The main differences between the two approaches are:
ImageName way will be in use when the system will cache, the programmer is unable to handle the cache, which is automatically processed by the system, for the repeated loading of the image, the speed will improve a lot, so the user experience is good. So if a picture needs to be used more than once in the app, or repeated references, the way to use imagename is better
Imagewithcontentsoffile, the system will be released after the use is complete and will not be cached, so there is no such problem. In general, all images will not be cached. Some of the pictures in the application only one or two times, you can use such a way, such as the Novice Guide screen pictures and so on, it is suitable for this way. There are no obvious boundaries.
iOS Development Summary (A0)-imagewithname: With Imagewithcontentsoffile: