显然 Apple 刚刚发布了 new iPad .就开发人员而言,添加新 Assets 以支持 iPad 型号的视网膜和非视网膜显示器有何影响?和 iPhone 4 和 4S 上实现的@2x 模型一样吗?
如果我有 foo.png,我会将它的不同大小版本命名为什么名称,以便它可以在所有 iOS 设备上的通用应用程序中工作?
这可能会通过按照您所说的方式解决,@2x
但使用设备修饰符,因为它们使像素数增加了一倍。你可能会写 myimage@2x~ipad.png
.
Applications running in iOS 4 should now include two separate files for each image resource. One file provides a standard-resolution version of a given image, and the second provides a high-resolution version of the same image. The naming conventions for each pair of image files is as follows:
Standard: <ImageName><device_modifier>.<filename_extension>
High resolution: <ImageName>@2x<device_modifier>.<filename_extension>
The
<ImageName>
and<filename_extension>
portions of each name specify the usual name and extension for the file. The<device_modifier>
portion is optional and contains either the string~ipad
or~iphone
. You include one of these modifiers when you want to specify different versions of an image for iPad and iPhone. The inclusion of the@2x
modifier for the high-resolution image is new and lets the system know that the image is the high-resolution variant of the standard image.
关于ios - iPad 3 上更高 dpi 的屏幕对 Assets 有何影响?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9609315/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |