I have an application that's laid out using an UITableView. The interface takes up more than just the screen, so there's some area that can be scrolled to. I would like some screenshots of the entire view (including the non-visible area) to use for documentation and soliciting feedback from my customer.
Is there programmatic way to get an image of the entire view? I don't think there would be a way on the device to do this, but maybe there is.
Save a full-page screenshot as a PDF On an iPhone with Face ID: Simultaneously press and then release the side button and volume up button. On an iPhone with a Home button: Simultaneously press and then release the Home button and side button.
On your iPhone, go to the page you want an extended screenshot from. Press the power and volume up buttons together on your iPhone like you would typically to grab a screenshot. Touch the screenshot's floating thumbnail on the bottom-left corner.
Just pasting some code I used in my app. It draws a view to an image (potentially scaling). Maybe you could programmaticaly scroll the table and stitch the images together in the end or something similar:
+ (UIImage *)captureView: (UIView *)view inSize: (CGSize)size
{
UIGraphicsBeginImageContext(size);
CGSize viewSize = view.frame.size;
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextScaleCTM( context, size.width/viewSize.width, size.height/viewSize.height);
[view.layer renderInContext: UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return viewImage;
}
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With