读取图片的两种方法

*读取图片的方法:

*[UIImage imageNamed:filename]:通过图片名称加载会缓存图片,使用完成后不会释放,占用内存

*UIImage imageWithContentsOfFile:path:通过文件路径加载,不会缓存图片,使用完后自动释放

建议较多图片使用imageWithContentsOfFile: 加载图片

原文地址:https://www.cnblogs.com/741162830qq/p/4768025.html