iOS 8 - 如何隐藏键盘上方的建议列表? [英] iOS 8 - How to hide suggestion list above keyboard?

查看:92
本文介绍了iOS 8 - 如何隐藏键盘上方的建议列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法隐藏键盘上方的建议清单?我在文档中找不到任何解决方案。

Is there any way to hide suggestions list above keyboard? I couldn't find any solution in documentation.

推荐答案

是的。您必须在文本字段/文本/符合 UITextInputTraits协议,可以通过 autocorrectionType 属性。

Yes there is. You have to disable autocorrection on the text field/text/any other class that conforms to the UITextInputTraits protocol, which can be done through the autocorrectionType property.

textField.autocorrectionType = .no

此外,如果您有兴趣,以下是唯一 UIKeyboardTypes
默认情况下没有建议。

Additionally, if you're interested, the following are the only UIKeyboardTypes that don't have suggestions by default.


  • DecimalPad

  • NumberPad

  • Pho nePad

这篇关于iOS 8 - 如何隐藏键盘上方的建议列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆