Und*_*dog 1 iphone objective-c uiwebview uiimageview uiimage
在我计划做的ipad应用程序中,它将完全是关于在UIWebView中加载网页.我有一个功能,其中我将显示UIWebViews的预览,更像是这些网页的缩略图.我该怎么做呢?从这些网页生成UIImage会很酷......希望有人可以帮助我实现这一目标.
UIGraphicsBeginImageContext(yourWebView.bounds.size);
[yourWebView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *resultImageView = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud)
这resultImageView将是你的答案......
| 归档时间: |
|
| 查看次数: |
2250 次 |
| 最近记录: |