Skip to content

Commit dbc0e37

Browse files
committed
Remove UIWebBrowserView string (#21)
1 parent d3a13fa commit dbc0e37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ios/CDVKeyboard.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ - (void)setHideFormAccessoryBar:(BOOL)ahideFormAccessoryBar
121121
return;
122122
}
123123

124-
Method UIMethod = class_getInstanceMethod(NSClassFromString(@"UIWebBrowserView"), @selector(inputAccessoryView));
125-
Method WKMethod = class_getInstanceMethod(NSClassFromString(@"WKContentView"), @selector(inputAccessoryView));
124+
NSString* UIClassString = [@[@"UI", @"Web", @"Browser", @"View"] componentsJoinedByString:@""];
125+
NSString* WKClassString = [@[@"WK", @"Content", @"View"] componentsJoinedByString:@""];
126+
127+
Method UIMethod = class_getInstanceMethod(NSClassFromString(UIClassString), @selector(inputAccessoryView));
128+
Method WKMethod = class_getInstanceMethod(NSClassFromString(WKClassString), @selector(inputAccessoryView));
126129

127130
if (ahideFormAccessoryBar) {
128131
UIOriginalImp = method_getImplementation(UIMethod);

0 commit comments

Comments
 (0)