What should be the size of the 1x asset image?

mshwfmshwf EGMember ✭✭✭

If an image should take the half of the screen width and the quarter of the screen height then what should be the size of the 1x version of that image?

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    The 1x resources are used for devices: iPhone 1G, iPhone 2G, iPhone 3G, iPhone 3GS. These are very old devices, I think there's no need to consider this kinds of iPhones.
    For 2x you can refer to the iPhone XR's resolution and 3x referring to the iPhone XS Max's. Use the largest resources and you can scale it on developping time.
    For the native project, you can use NSLayoutConstraint to keep this image's width half to the screen and height quarter to the screen.
    For Forms you can use RelativeLayout to wrap your image.

Sign In or Register to comment.