【问题标题】:Best way to handle device specific images in ios 7 and ios 7+在 ios 7 和 ios 7+ 中处理设备特定图像的最佳方法
【发布时间】:2014-12-09 09:12:58
【问题描述】:

在 ios 4 和 4+ 中运行的应用现在应该为每个图像资源包含两个单独的文件。一个文件提供给定图像的标准分辨率版本,第二个文件提供同一图像的高分辨率版本。每对图像文件的命名约定如下:

Standard:        <ImageName><device_modifier>.<filename_extension>

High Resolution: <ImageName>@2x<device_modifier>.<filename_extension>

前:

name~iphone.png    
name@2x~iphone.png

name~ipad.png   
name@2x~ipad.png

这是引入和定义的默认命名约定。 its documentation!

这个故事/问题的意图:

我只是想知道,在项目中处理设备特定图像的最佳方法是什么。

以更少的努力,而我们有更多的设备(3.5 英寸、4 英寸、4.7 英寸、5.5 英寸)要在项目中考虑。

【问题讨论】:

    标签: ios iphone ios7 swift ios8


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      查看 iOS 界面指南。显示的表格表明,只有 5.5 英寸的屏幕需要更改资产/名称:

      Guide here

      > Asset:
      > 
      > iPhone 6 Plus (@3x) 
      >
      > iPhone 6 and iPhone 5 (@2x)
      >
      >iPhone 4s (@2x) 
      >
      >iPad and iPad mini (Retina iPad and iPad Mini) (@2x) 
      >
      >iPad 2 and iPad mini (@1x)
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-01-08
        • 2014-05-22
        • 1970-01-01
        • 2014-06-21
        • 1970-01-01
        相关资源
        最近更新 更多