[英]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.