I am having problems with the following code, but only a snapshot of my UITableView, and not the whole screen with navigation and tabs ...
I need a full screen capture, including navigation and tab bars. Any help was greatly appreciated.
- (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; }
Steve source share