How to handle image scale on all the available iPhone resolutions?

后端 未结 8 638
悲&欢浪女
悲&欢浪女 2020-11-28 17:06

What sizes would be the best to use for images: background.png, background@2x.png and background@3x.png if we want to use this image for example to cover the full width and

8条回答
  •  再見小時候
    2020-11-28 17:54

    I personally will be doing :

    ImageName@2x iPhone 4/4s
    ImageName-568h@2x iPhone 5/5s
    ImageName-667h@2x iPhone 6
    ImageName-736h@3x iPhone 6Plus

    The logic behind this is that it shows a difference between all devices, whereas width shares the same value on the iPhone 5s and iPhone 4s

    Edit:

    This is just the naming convention I am using for resources that are device dependant, such as a background image taking the whole screen, most of the time all you want is:

    ImageName@2x iPhone 4/4s/5/5s/6
    ImageName@3x iPhone 6Plus/Zoom mode

提交回复
热议问题