UIWebView屏幕截图上的灰色框

时间:2011-05-27 07:43:48

标签: iphone ios uiwebview

我使用此方法将webview屏幕截图保存到文件中:

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

UIGraphicsEndImageContext();

[imageData writeToFile:imagePath atomically:YES]; 

但有时它的灰色区域。我如何删除那个灰色区域?

UIWebView Screenshot Files

0 个答案:

没有答案
相关问题