How to set up a custom keyboard for UIWebView

How to show a custom keyboard and input accessory view for editable UIWebView for iOS7 and higher.

ie: How can I set and use the value from [UIWebView setInputView:] and [UIWebView setInputAccessoryView:]

+7
ios objective-c uiwebview
source share
3 answers

I believe that at the moment there is no way to do this. Therefore, my current approach is to use a custom view under the keyboard and hide the keyboard and show the keyboard as needed.

0
source share

It would be helpful to understand what you are trying to do? You can either try to force the use of a keyboard of a certain type, such as numeric, e-mails, etc., which will use the keyboard that the user has explicitly installed on his device (or in the system).

To do this, you can reference this apple document , which shows you the 'type' attribute to add to the tag.

Otherwise, you are asking about loading a custom keyboard that you created from a web browser. The application developer in me shouts, "You should NEVER do this." If your content is generic enough to merit an investment in web browsing, then of course you should not download a custom keyboard.

If you need to do this, you can set the DisplayRequiresUserAction keyboard to NO, and then use custom javascript to request the application to perform its own function, then drop uitextfield or uitextview directly on top of the html input field and set the user input type on its own control. There are an obscene amount of problems associated with this approach, and I sincerely hope that you

+4
source share

Are you trying to customize your ios keyboard or want to display an HTML keyboard?

In the first case, you can see this link: link

In the second case, you can just use Google for it, this is the first search result for "html keyboard".

Good luck.

0
source share

All Articles