iPhone上的Retina显示图像 [英] Retina Display Images on iPhone

查看:90
本文介绍了iPhone上的Retina显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

如何适应iPhone 4的屏幕分辨率?

在iPhone应用程序中包含Retina显示图像的最佳方法是什么。 iPhone 3G或较旧的iPhone有更高分辨率的图像是否有问题?

What is the best way to include Retina Display Images on an iPhone app. Are there issues with the iPhone 3G or older iPhone with higher res images?

推荐答案

包含名为的高分辨率版本的图像asimage@2x.png(其中image.png是正常分辨率)。使用 [UIImage imageNamed:@image.png] 访问图像时,将自动选择正确的图像。没有视网膜显示器的设备不会加载高分辨率版本,因此没有内存开销。

Include a hi-res version of your image named as "image@2x.png" (where "image.png" is the normal resolution). When you access your image using [UIImage imageNamed:@"image.png"], the correct one will be chosen automatically. Devices without retina display won't load the hi-res version, so there's no memory overhead.

这篇关于iPhone上的Retina显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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