How to programmatically disable predictive view in WebView of iOS 8

纵然是瞬间 提交于 2019-12-06 10:47:37

问题


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:


回答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.



来源:https://stackoverflow.com/questions/25041156/how-to-programmatically-disable-predictive-view-in-webview-of-ios-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!