bc a
bc a

Reputation: 117

iOS: image rotates after retrieve from Application folder

After I tried the codes in Save An Image To Application Documents Folder From UIView On IOS I found it works on iPhone. But when I retrieve the png image from folder and show it on imageView, the photo rotate 90 degrees anticlockwise. So, how to solve it ? Thank you guys for help sincerely.

Upvotes: 1

Views: 116

Answers (1)

Pratik
Pratik

Reputation: 2399

I have faced same problem and i have solved it using class files please download class files from below link and drag & drop in to your project

https://www.dropbox.com/sh/52soto4mxpdcqhz/iFrkKttSv0

after that import it in the view controller where you are retrieving image

#import "UIImage+fixOrientation.h"

and before you save image to application folder put below code

UIImage *image = [selectedImage fixOrientation];

Upvotes: 1

Related Questions