Ok, so here's the thing. I've read here and on many other forums how you rotate and scale an UIImage the best way. The conclusion was, it's best to it do with CGGraphics and do an CGAffineTransform etc. with an UIImageOriantationUP. I've even come across some custom code that did exactly that. BUT, my UIImage doesn't respond to any code of this at all!
I have a graph that I have done with the opensource framework core-plot. It works perfect, and now I want the user to be able to mail this graph. I therefore take the view of the graph and turn it to an UIImage and then save it to the sandbox for the mail-class to pick it up.
With this little nifty code I turn the UIView into a UIImage: "self" being the class of the Graph (Core-plot class)
UIGraphicsBeginImageContext(self.view.bounds.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
All works fine, until I try to mail it. The Graph-image is both mirrored AND turned upsidedown. If this wasn't enough, it as said doesn't respond to any action at all. I've tried almost everything and now I need help.