Search code examples
iosuiimageassetsdimensions

Incorrect Assets image loads in iPad


I have added an image of three dimensions to Assets.xcassets

back.png with size 18 x 14 pixels
back@2x.png with size 36 x 28 pixels
back@3x.png with size 54 x 42 pixels

I have set the image property of UIButton as "back" in Attributes Inspector. On running the application on iPad Pro(12.9-inch 3rd generation), Xcode should automatically populate back@3x.png as image on that UIButton. But, its loading lowest resolution image i.e. back.png, on the UIButton.

Please assist as I need to load higher pixels image for iPad's.


Solution

  • From Apple guidelines of image size and resolution the new iPad Pro (12.9 3rd generation) uses the @2x.