Hide keyboard in UIWebView

Is there a way to get UIWebView to reject all related input controls like keyboards / pickers?

+3
source share
2 answers
    for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows])
    for (UIView *keyboard in [keyboardWindow subviews])

        if([[keyboard description] hasPrefix:@"<UIFormAssistant"] == YES)
        {
            [keyboard removeFromSuperview];
        }

Dirty way, but it works;)

+2
source

Didn't try this in a web view using a collector, but it definitely works to remove the keyboard:

[theWebView endEditing:YES];
+9
source

Source: https://habr.com/ru/post/1757604/


All Articles