Tab bar icons on retina display

后端 未结 1 1671
囚心锁ツ
囚心锁ツ 2021-02-15 18:12

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 stil

1条回答
  •  粉色の甜心
    2021-02-15 18:30

    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/

    0 讨论(0)
提交回复
热议问题