Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 683
chris P Avatar asked Jun 09 '15 06:06

chris P


People also ask

What is the difference between UIImage and UIImageView?

UIImage contains the data for an image. UIImageView is a custom view meant to display the UIImage . Save this answer.

How do I display an image in Objective C?

UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(10.0, 20.0, 0.0, 0.0)]; UIImage *myimg = [UIImage imageNamed:@"A1. jpg"]; imageview. image=myimg; [imageview sizeToFit]; And don't forget to add image view to view hierarchy.


1 Answers

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.

like image 170
Alan Francis Avatar answered Oct 15 '22 01:10

Alan Francis