Why do I need @1x, @2x and @3x iOS images?

后端 未结 6 1126
自闭症患者
自闭症患者 2020-12-04 07:12

Why do we need these 3 particular image types?

If I have a button on my app with a background image say, 50 pixels x 50 pixels, why do I need 3 versions of this imag

6条回答
  •  天涯浪人
    2020-12-04 07:46

    First of all, you need to know points vs. pixels behaviour. On non-retina devices, point vs pixels ratio is 1point=1pixel. On retina devices, there are two ratios: 1point = 2x2 pixels depending on screen size, and 1point=3x3 pixels, because of pixels density, that is quadrupled watching on non retina.
    That's why you need this 3 types of images, to be shown on its highest resolution.

提交回复
热议问题