Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

theprizerevealed

macrumors regular
Original poster
Feb 26, 2016
183
12
I have a UIView that seems to be too small for the image that I'm trying to display. I have my images in groups with different resolutions with the greatest resolution at 3 times size.

so if I have three files: file@3x.png, file@2x.png, and file@1x.png. How would I used Xcode to select a smaller image or any particular image to appear in my UIView? thanks for you help
 
If you use the image assets library in your project then you drop those images onto the 1x, 2x, 3x boxes for that image file. The device will choose the image to use based on the screen resolution. If you want to adjust the display size of the image you do that by adjusting the frame of the image view that displays the image. You would normally do that these days with constraints and possibly size classes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.