Skip to content

Move from UIWebView to WKWebView #764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "ObservingInputAccessoryViewTemp.h"
#import "UIResponder+FirstResponderTemp.h"

#import <WebKit/WebKit.h>
#import <React/RCTScrollView.h>
#import <React/RCTBridge.h>
#import <React/RCTUIManager.h>
Expand Down Expand Up @@ -128,7 +129,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
return subview;
}

-(void)_swizzleWebViewInputAccessory:(UIWebView*)webview
-(void)_swizzleWebViewInputAccessory:(WKWebView*)webview
{
UIView* subview;
for (UIView* view in webview.scrollView.subviews)
Expand Down Expand Up @@ -235,9 +236,9 @@ - (void)initializeAccessoryViewsAndHandleInsets
{
[self setupTextView:(UITextView*)subview];
}
else if ([subview isKindOfClass:[UIWebView class]])
else if ([subview isKindOfClass:[WKWebView class]])
{
[self _swizzleWebViewInputAccessory:(UIWebView*)subview];
[self _swizzleWebViewInputAccessory:(WKWebView*)subview];
}
}

Expand Down