Bundle 內(nèi)支持多語(yǔ)言,xcassets 不支持 此外,使用 imageNamed 創(chuàng)建的 UIImage,會(huì)立即被加入到 NSCache 中(解碼后的 Image Buffer),直到收到內(nèi)存警告的時(shí)候,才會(huì)釋放不在使用的 UIImage;而使用 imageWithContentsOfFile 創(chuàng)建的對(duì)象,每次都會(huì)重新申請(qǐng)內(nèi)存,相同圖片不會(huì)緩存。因此,建議常用的、較小的圖,放在 xcassets ...
www.dbjr.com.cn/article/1729...htm 2025-5-28