How to keep original orientation of the UIImage..

H

Hello All,

While working on an application, I was having the client’s requirement that, while displaying an image in imageview the image must be of same orientation same as the original.

After googling, I got the way for doing this.

Here is the way,

UIImage *image; //Here assign the image which you want

UIImageView *imageView = [[UIImageView alloc] init];

imageView.image = image;

imageView.contentMode = UIViewContentModeScaleAspectFit;

Setting this property gives the original orientation of the image.

So simple…

Happy Coding…. 🙂

 

About the author

minakshi.bhosale
By minakshi.bhosale

Category