UITextField inputView显示撤消,重做,粘贴按钮 [英] UITextField inputView displays undo, redo, paste buttons
本文介绍了UITextField inputView显示撤消,重做,粘贴按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为我的UITextField
创建了一个自定义inputView
.视图本身的外观和功能很棒,但是在iPad上,我正在自定义inputView
上方进行撤消,重做和粘贴按钮.如何删除这些按钮?它们没有任何功能,但应将其删除.
I have created a custom inputView
for my UITextField
. The view itself looks and functions great, but on the iPad I'm getting undo, redo, and paste buttons above my custom inputView
. How do I remove those buttons? They don't have any functionality, but they should be removed.
推荐答案
使用Swift 3和XCode 8,我可以通过删除文本字段输入上的两个按钮组来删除该栏:
With Swift 3 and XCode 8 I was able to remove the bar by removing the two button groups on the text field input:
self.textField.inputAssistantItem.leadingBarButtonGroups.removeAll()
self.textField.inputAssistantItem.trailingBarButtonGroups.removeAll()
这篇关于UITextField inputView显示撤消,重做,粘贴按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文