Hi All,
In my iPhone application, i am using the following code to get a snap shot from the iphone application.
-(UIImage *)captureView:(UIView *)view { CGRect screenRect = [view bounds];
UIGraphicsBeginImageContext(screenRect.size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
[[UIColor clearColor] set];
CGContextFillRect(ctx, screenRect);
[view.layer renderInContext:ctx];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIImageWriteToSavedPhotosAlbum(newImage, nil, nil, nil);
UIGraphicsEndImageContext();
return newImage;
}
But i am passing the uiimage view instead of a UIView.
It is saving the snap shot of the UIImageview...right..
but i have added another uitextview with some text on the uiimageview. but there is no text in the result snap image .. :-(
So, how to take a snap along with all subviews of uiimageview?