iOS不使用-568h@2x.png [英] iOS not using -568h@2x.png

查看:131
本文介绍了iOS不使用-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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆