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

后端 未结 5 835
轮回少年
轮回少年 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:42

    For @3x image increase @1x image size by 3 times!

    e.g.

    15 x 15 = @1x

    30 x 30 = @2x

    45 x 45 = @3x

    OR

    100 x 100 = @1x

    200 x 200 = @2x

    300 x 300 = @3x

    OR

    15 x 10 = @1x

    30 x 20 = @2x

    45 x 30 = @3x

    I hope this is helpful to you!

提交回复
热议问题