Gray box on UIWebView Screenshot

这一生的挚爱 提交于 2019-12-13 05:19:05

问题


I save a webview screenshot to a file using this method:

UIGraphicsBeginImageContext(webview.bounds.size);     
[webview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

[imageData writeToFile:imagePath atomically:YES]; 

But sometimes it's have a gray area in it. How i remove that a gray area?

来源:https://stackoverflow.com/questions/6149289/gray-box-on-uiwebview-screenshot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!