ios截图保存本地相册

ios截图保存本地相册



UIGraphicsBeginImageContextWithOptions(self.whiteboardVC.docView.bounds.size, NO, 0);
CGContextRef ctd = UIGraphicsGetCurrentContext();
[self.self.whiteboardVC.view.layer renderInContext:ctd];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);


Loading Disqus comments...
Table of Contents