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?
UIImage contains the data for an image. UIImageView is a custom view meant to display the UIImage . Save this answer.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With