iOS不使用-568h@2x.png [英] iOS not using -568h@2x.png
问题描述
我有3张图片:
test.png
test@2x.png
test- 568@2x.png
在IBOutlet中,UIImageView设置为显示test.png。 >
在没有视网膜的iPhone 3.5in上显示test.png
在iPhone 3.5in中, 2x.png
但是在iPhone 4in的视网膜,它显示test@2x.png!
发生了什么事?
谢谢!
568 @ 2x
后缀仅适用于Default.png启动图像。没有 UIImage imageNamed:
(或其他 UIImage
方法)使用的特殊后缀。如果您需要在4屏幕上显示特殊图片,则需要添加代码以自己获取所需的图片。
I have 3 images:
test.png
test@2x.png
test-568@2x.png
In IBOutlet, a UIImageView is set to display test.png.
On iPhone 3.5in without retina, it's displaying test.png
On iPhone 3.5in with retina, it's displaying test@2x.png
But on iPhone 4in with retina, it's displaying test@2x.png!!!
What's going on?
Thanks!
The -568@2x
suffix only applies to the Default.png launch images. There is no special suffix used by UIImage imageNamed:
(or the other UIImage
methods). If you need a special image on the 4" screen, you need to add code to get the desired image yourself.
这篇关于iOS不使用-568h@2x.png的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!