Tab bar icons on retina display

◇◆丶佛笑我妖孽 提交于 2019-12-04 19:52:36

问题


I am making an iPhone App but I can't understand why my custom tab bar icons are pixelated. They are 30x30. If I change the resolution to 60x60, for example, the icons are still pixelated but they are also incomplete.

Can you help me to fix this problem? Thank you very much.


回答1:


You don't need to double the size of your non-retina images.
You need to create two separate icons icon.png (30x30) and icon@2x.png (60x60).
iOS will automatically load the right file based on the screen scale.
You can find more information about taking advantage of the retina display at this url: https://developer.apple.com/resources/high-resolution/



来源:https://stackoverflow.com/questions/15391624/tab-bar-icons-on-retina-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!