简体   繁体   English

如何在iOS 8上检测预想文本

[英]How to detect predictive text on iOS 8

I've noticed one of the annoying things about my UITextFields and UITextViews is I have a programatically created UIToolBar above it for a Previous, Next and Done buttons that interact with the text fields gets hidden when the predictive text appears. 我注意到关于UITextFields和UITextViews的一件烦人的事情是,我在上面有一个以编程方式创建的UIToolBar,用于与文本字段进行交互的Previous,Next和Done按钮在显示预测文本时被隐藏。

I was wondering if there was a way to disable this programatically or detect it so I can move the toolbar up or down depending on whether it is showing or hidden. 我想知道是否有办法以编程方式禁用此功能或对其进行检测,因此我可以根据工具栏是显示还是隐藏来上下移动工具栏。 Or is this feature only available in Swift? 还是仅在Swift中提供此功能? I'm still using Objective-C. 我仍在使用Objective-C。

将您的工具栏设置为文本字段和文本视图的inputAccessoryView,这将很不错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS自动更正和预测文本 - iOS autocorrection and predictive text Swift iOS-如何在打开和关闭时使文本字段根据预测文本移动 - Swift iOS - How to get the textfield to move according to the predictive text when turning off and on 选择预测文本并将其添加到文本时,不会触发iOS textViewDidChange - iOS textViewDidChange is not triggered when predictive text is selected and added to text 为iOS自定义键盘添加语言词典以获得预测(暗示)文本 - Add a Language Lexicon to iOS Custom Keyboard for Predictive (Suggestive) Text 可以在 iOS 14 上使用 keyboardType emailAddress 在 UITextField 上隐藏预测文本栏吗? - Possible to hide predictive text bar on UITextField with keyboardType emailAddress on iOS 14? 隐藏 iOS 键盘预测文本栏 - UITextView / UITextField - Hide iOS Keyboard Predictive Text Bar - UITextView / UITextField 在iOS中以编程方式清除可编辑的内容不会重置预测文本 - Programmatically clearing contenteditable in iOS does not reset predictive text 可以以编程方式提供iOS预测键盘上下文/源文本? - Possible to programmatically feed the iOS predictive keyboard context/source text? 如何在 iOS 中检测文本(字符串)语言? - How to detect text (string) language in iOS? 检查是否启用了预测文本 - Check if predictive text is enabled
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM