Search code examples
iphoneiosxcodeuiimageviewscreenshot

How to take the screenshot( or image merge) for the 3D Transformed image?


I want to merge the two images(Check screenshot 1), and change to the single image. But I am mot able to merge the 3D Transformed image.

If I merge the image means, its goes to the original size(Check screenshot 2).

How can I merge the image or take screenshot for the 3D Transformed image view.

enter image description here enter image description here

I am used following code for merge the images,

-(UIImage *)captureView:(UIImageView *)imageView
{
    //Merge the two images.
    UIGraphicsBeginImageContext(backgroundImageView.frame.size);
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    [imageView.layer renderInContext:ctx];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newImage;
}

Solution

  • To take screen shot of 3D transformed view, you need to convert 3D transformed view to affine transform and then take the screen shot