What should image sizes be at @1x, @2x and @3x in Xcode?

后端 未结 5 827
轮回少年
轮回少年 2020-11-29 17:47

For example, I have a 100*100 size imageview or button, and I want to set its image or backgroundImage with a local .png file. Based o

5条回答
  •  借酒劲吻你
    2020-11-29 18:51

    Yes, your understanding is correct.

    A standard resolution image has a scale factor of 1.0 and is referred to as an @1x image. High resolution images have a scale factor of 2.0 or 3.0 and are referred to as @2x and @3x images. Suppose you have a standard resolution @1x image that’s 100px × 100px, for example. The @2x version of this image would be 200px × 200px. The @3x version would be 300px × 300px.

    For more details you can check this link https://developer.apple.com/ios/human-interface-guidelines/graphics/image-size-and-resolution/

提交回复
热议问题