xcode 视网膜显示屏上的标签栏图标
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15391624/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tab bar icons on retina display
提问by CrazySoftware
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.
我正在制作一个 iPhone 应用程序,但我不明白为什么我的自定义标签栏图标是像素化的。它们是 30x30。例如,如果我将分辨率更改为 60x60,图标仍然是像素化的,但它们也不完整。
Can you help me to fix this problem? Thank you very much.
你能帮我解决这个问题吗?非常感谢。
回答by s1m0n
You don't need to double the size of your non-retina images.
You need to create two separate icons icon.png
(30x30) and [email protected]
(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/
您不需要将非视网膜图像的大小加倍。
您需要创建两个单独的图标icon.png
(30x30) 和[email protected]
(60x60)。
iOS 会根据屏幕比例自动加载正确的文件。
您可以在以下网址找到有关利用视网膜显示的更多信息:https: //developer.apple.com/resources/high-resolution/