I’m using this bit of code to capture the iPad screen. I keep getting an error message with “self.view.layer”
UIGraphicsBeginImageContextWithOptions(window.bounds.size, window.opaque, 0.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
Firstly Add QuartzCore framework in Your Project and add
#import < QuartzCore/QuartzCore.h >
at the top of you viewController.m file