Reputation: 359
I have an image which is 200x200 but I want to display it in full screen in iphone 5 .So when I display that image in full iamge view it is stretched . What to do??/
Upvotes: 0
Views: 2575
Reputation: 309
You need to resize the image with size of full screen size and then display on full screen. For reference, please check the following answer:
How to resize the image programmatically in objective-c in iphone
Hope, It will help you, Sir
:)
Upvotes: 0
Reputation: 23223
It's not possible. A single 200x200 image cannot fill a space larger than 200x200 without stretching/scaling.
You do have various options for displaying it in an UIImageView
though See Apple's Documentation on UIViewContentMode for the contentMode
options.
UIImage *img = [UIImage imageNamed:@"glyph"];
self.imageView.image = img;
self.imageView.contentMode = UIViewContentModeScaleAspectFit;
Upvotes: 1