What types/sizes of images do you need when using UIImage full screen?

345 views Asked by At

I'm targeting iOS8 to release an application. So it'll be available on 4S, 5's, 6, 6+, and iPad 2+.

I have a ViewController where, I present a UIImageView that is the entire size of my UIViewController's View.

My question is... what sizes do I need the image in. Am I going to need it in a special size for each device? Or does the 4s/5/6 all use the same ratios for example, while the 6+ has its own unique ratio? Or do I just use 1 image size and let it auto scale it (or will that stretch/skew the image)?

Also, what's the minimal size the image should be? If it's smaller than the native size of the iPhone 6+ for example, won't the quality of the image deteriorate?

3

There are 3 answers

1
Ankit Kumar On

you need special size for each device by using image.xcassets.And this will help you alot - https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html

0
Vatsal Raval On

The image in Imageview in 4s/5/6 devices render at @2x while that in 6+ it renders at @3x.So take an image and name it as [email protected] and other image for 6+ having higher resolution , name it as [email protected] When the image is placed in imageview , It will automatically takes [email protected] for 4s/5/6 and [email protected] for 6+.

0
Alan Francis On

In iOS8, you can use different size classes for different screens

use this post to begin.

Also refer this for more info about using different graphics for varying resolution.