A. imageNamed:
B. initWithContentOfFile:
C.[[UIImage alloc] init]
D.imageWithCGImage:scale:orientation
</br>
</br>
</br>
</br>
正確答案:D
解析:
imageNamed:系統(tǒng)會(huì)檢查系統(tǒng)緩存中是否有該名字的Image,如果有的話暗甥,則直接返回佛舱,如果沒有,則先加載圖像到緩存,然后再返回
initWithContentsOfFile:系統(tǒng)不會(huì)檢查系統(tǒng)緩存钢属,而直接從文件系統(tǒng)中加載并返回熔萧。
imageWithCGImage:scale:orientation 當(dāng)scale=1的時(shí)候圖像為原始大小,orientation制定繪制圖像的方向
轉(zhuǎn)載自《猿圈》
</br>
</br>
[專注待辦](https://itunes.apple.com/cn/app/zhuan-zhu-dai-ban-ding-shi/id1103227570?mt=8)