简体   繁体   中英

Tab bar icons on retina display

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.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM