Is it possible in objective C that we can take the screen shot of screen and stored this image in UIImage.
// 100% Work
- (UIImage *)screenshot
{
UIGraphicsBeginImageContextWithOptions(self.main_uiview.bounds.size, NO, 2.0f);
[self.main_uiview drawViewHierarchyInRect:_main_uiview.bounds afterScreenUpdates:YES];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}