How to programmatically disable predictive view in WebView of iOS 8
Asked Answered
V

1

2

I'm designing a custom keyboard for iOS 8. It works fine on any UITextField but when it's in UIWebView, it shows predictions. Since it's allowed to have custom keyboard in iOS 8 I assume there should be a way to disable this view. Any help would be appreciated. Red area of the following picture: enter image description here

Verticillaster answered 30/7, 2014 at 15:43 Comment(2)
I have an opposite problem - I also develop the custom keyboard and I don't know how to get the Prediction iOS view. How did u did it?Outdate
@Outdate It's basically a new question but I will answer you here. Yo cannot get the default prediction view by designing your own custom keyboard. If you want a prediction view you should design it from scratch by yourself. The reason that I have prediction view is because it's a native keyboard and it's in UIWebView.Verticillaster
V
1

I found a workaround solution for this problem. If you add type="email" instead of type="text" in your HTML file like bellow, iOS keyboard won't show the predictive view :)

<input type="email"/>

I temporarily mark this answer as the solution but if someone finds a way to do it from Objective-C part, I'll test and accept that answer as the solution.

Verticillaster answered 30/7, 2014 at 20:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.