On click event of a button
[mybutton addTarget:self action:@selector(captureView)
forControlEvents:UIControlEventTouchUpInside];
- (void)captureView {
UIGraphicsBeginImageContext(CGSizeMake(320,480));
CGContextRef context = UIGraphicsGetCurrentContext();
[self.view.layer renderInContext:context];
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSLog(@"%@",screenShot);
}
My screenshot prints UIImage: 0x4b249c0. Is this correct code to take a screen short of a particular area of an iphone app? Where this image store at that particular time. How can i see those images?