Saturday, December 29, 2012

UIView to UIImage

A simple way to capture a UIView in a UIImage or PDF.

Import CaptureView.h/.m

For an image screenshot:

UIImage* screenshotImage = [CaptureView viewToImage:self.view];
For a PDF screenshot:
NSData* pdfData = [CaptureView viewToPdf:self.view];

No comments:

Post a Comment