I m trying to take snap shot for ipad screen having 2 - 3 views. I m able to do that.
Now whats my problem is when I m in landscape mode, I just transformrotate one view with
CGAffineTransform transform;
transform = CGAffineTransformMakeRotation(M_PI/2);
imgPlayBoard.transform = transform;
Now, when I take the snap shot, then the image in image view appears portrait. Whats happening I am not able to get it. I am using following function to take a snapshot.
-(UIImage *)saveImage{
UIGraphicsBeginImageContext(imgPlayBoard.frame.size);
[imgPlayBoard.layer renderInContext:UIGraphicsGetCurrentContext()];
[imagesView.layer renderInContext:UIGraphicsGetCurrentContext()];
[drawBoard.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIImageWriteToSavedPhotosAlbum(resultingImage, nil, nil, nil);
UIGraphicsEndImageContext();
return resultingImage;
}
And this is the image I m getting. The size of the image is same in the snap, but all apears is white.