Skip to content

Instantly share code, notes, and snippets.

View trotzig's full-sized avatar

Henric Trotzig trotzig

View GitHub Profile
vpaharia / SnapshotWKWebView.m
Created November 3, 2016 19:32
Snapshot complete WKWebView
// to snapshot complete wkwebview, scroll webview itself inside a container view rather than scrolling webview's content
@property (strong, nonatomic) WKWebView* webView;
@property (strong, nonatomic) UIView *containerView;
- (void)setupWebview:(CGSize)size {
WKWebViewConfiguration *configuration = [[WKWebViewConfiguration alloc] init];
[configuration.userContentController addScriptMessageHandler:self name:@"interOp"];