[英]How is a done button added to a keyboard
我有一個鍵盤,它可以編輯UITextView中的文本,然后點按回車鍵可以關閉鍵盤,它只會向下移動到下一行。
如何添加完成按鈕並使鍵盤關閉?
實施
textView:shouldChangeTextInRange
查找“ \\ n”的方法,然后調用
resignFirstResponder在textView ,如果發現。
resignFirstResponder
textView
參考
[英]How to remove added done button from numeric keyboard
[英]How to add Done button to the keyboard?
[英]How to get keyboard with Next, Previous and Done Button?
[英]How to add a done button to the keyboard in landscape mode?
[英]How to remove Done and Cancel button on keyboard?
[英]How to change the keyboard Done button behavior?
[英]How to change keyboard's DONE button,iPhone
[英]How to hide the keyboard using ‘done’ button Swift 4
[英]How to add a 'Done' button to numpad keyboard in iOS
[英]Resign keyboard on 'Done' button of keyboard
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.