I save a webview screenshot to a file using this method:
UIGraphicsBeginImageContext(webview.bounds.size);
[webview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[imageDat开发者_运维问答a writeToFile:imagePath atomically:YES];
But sometimes it's have a gray area in it. How i remove that a gray area?
精彩评论