Code to capture screenshot in iOS
This is method which take the screenshot of you current screen in iOS - ( UIImage *)captureView:( UIView *)view { CGRect rect = [[ UIScreen mainScreen ] bounds ]; UIGraphicsBeginImageContext (rect. size ); CGContextRef context = UIGraphicsGetCurrentContext (); [view. layer renderInContext :context]; UIImage *img = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); return img; }