I’m new in iOS programming and I don’t know how to make UIImageView load content depending on the screen that is running the app. In my case i have a 100 frames animation. Is possible to scale the images for non-retina displays (the images are in 640×960 resolution) automatically using code? Thanks!!
Share
Yes. Just add normal images at your project (image1.png, image2.png, …) and your retina versions (image1@2x.png, image2@2x.png, …). The retina versions must have “@2x” appended at end of the name.
Just use the versions without “@2x” in your code, and the Xcode will do the rest. Additionally, you can import just “@2x” versions, use image without “@2x” in your code and iOS will downsample automatically in non-retina devices.