Skip to content

Instantly share code, notes, and snippets.

Avatar

Henric Trotzig trotzig

View GitHub Profile
@vpaharia
vpaharia / SnapshotWKWebView.m
Created Nov 3, 2016
Snapshot complete WKWebView
View SnapshotWKWebView.m
// 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"];