Created
January 11, 2020 09:27
-
-
Save DickyT/a46439a8cb3e62f73a9b9787401ed14d to your computer and use it in GitHub Desktop.
Send touch events to WKWebKit from other UIView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSValue *value = [webView valueForKey:@"_contentView"]; | |
WKContentView *content = [value nonretainedObjectValue]; | |
UIWebTouchEventsGestureRecognizer *gesture = [[UIWebTouchEventsGestureRecognizer alloc] initWithTarget:content action:@selector(_webTouchEventsRecognized:) touchDelegate:content]; | |
[gesture setDelegate:content]; | |
[forwardView addGestureRecognizer:gesture]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment