Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, if you can't beat them, join them.</p> <p>As far as I know, and I tried. You can't change the inputView or the inputAccessoryView without using a private class (UIWebBrowserView).</p> <p>But you can <strong>detect when the keyboard appears</strong>, with the notification UIKeyboardWillShowNotification. So, how about <strong>do a man in the middle</strong>? I mean, <strong>use a UITextField like a buffer</strong>.</p> <p>Let me explain a little more.</p> <p>When the keyboard appears, you can check if the first responder is the UIWebView, if it is, you can become a textview as the first responder. </p> <p>What do you win with that? The text typed with the keyboard go to the text view. That is useless, you would say. Of course, but how about <strong>change the input view of the textview</strong>? How? With this <a href="https://github.com/kulpreetchilana/Custom-iOS-Keyboards">https://github.com/kulpreetchilana/Custom-iOS-Keyboards</a></p> <p>You have a custom keyboard when the user is writing in the web view!!!</p> <p>How can you put the textview's text in the webview? Easy, <strong>Put the textview's text in the input of the inner html with textViewDidChange and javascript.</strong> </p> <pre><code>- (void)textViewDidChange:(UITextView *)textView{ NSString* script = [NSString stringWithFormat:@"document.activeElement.value = '%@';", textView.text]; [self stringByEvaluatingJavaScriptFromString:script]; } </code></pre> <p>I put in bold the main phrases of the idea. But, maybe my explanation is difficult to understand. Or my English is bad, so I uploade a sample <a href="https://github.com/dcorbatta/CKWebView">project</a> with the idea.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload