答案 0 :(得分:0)
以下是代码:
(UIWebView *)snapshotWebView { if(!_snapshotWebView){ _snapshotWebView = [[MTXWebView alloc] initWithManager:self frame:ORIGIN_FRAME]; _snapshotWebView.webViewDelegate = self; } return _snapshotWebView; }
(void)webview:(MTXWebView *)webView doLoad:(NSDictionary *)数据回调:(WVJBResponseCallback)responseCallback { webView.frame = CGRectMake(0,0,webView.scrollView.contentSize.width,webView.scrollView.contentSize.height); UIImage * image = [_snapshotWebView renderToImage]; self.completionBlock(图像); self.snapshotWebView.frame = ORIGIN_FRAME; }