Universal application iPad/iPhone image naming convention?

前端 未结 5 1770
有刺的猬
有刺的猬 2021-02-07 12:59

In my application I need to get the correct image based on the device iPad/iPhone 4/iPhone 3 device.

For example:

I have an image named a.png (widt

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 13:55

    Further to Nate's post, the specific documentation from Apple describing the naming convention can be found at:

    Supporting High-Resolution Screens - Updating Your Image Resource Files

    According to the link, the naming convention pattern is as follows:

    • Standard: .
    • High resolution: @2x.

    For example: "MyImage@2x~ipad.png" for a high-res iPad-specific image or "MyImage~iphone.png" for a standard-res iPhone-specific image.

提交回复
热议问题