iphone/ipad application - taking screen shot
- by satyam
I successfully implemented an application that works on ipad as well as on iphone.
In that I provided option to user to send the screen shot of the application as mail attachment. Even that is functioning well.
But my code is taking screen shot irrespective of orientation. The image i'm getting is always in portrait mode.
I want to take the screen shot depending on the orientation of ipad/iphone and send the image as attachment. I'm using following code to take the screen shot.
UIGraphicsBeginImageContext(screenWindow.frame.size);
[screenWindow.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();