![](/img/trans.png)
[英]Flutter iOS - How to hide the DONE button at the top of the ios keyboard?
[英]How i hide a top keyboard bar in iOS 9
我是一個初學者 ios 開發者。 我正在嘗試在 iOS 鍵盤上隱藏“快捷鍵盤欄”但沒有成功。 波紋管是我的代碼:
- (void)textFieldDidBeginEditing:(UITextField*)textField {
UITextInputAssistantItem* item = [textField inputAssistantItem];
item.leadingBarButtonGroups = @[];
item.trailingBarButtonGroups = @[];
}
我確實通過設置 autocorretionType 隱藏了助手欄按鈕,但是帶有操作按鈕(確定,完成,...)的頂部欄沒有隱藏。
有人可以幫我嗎? Tks。
如果您的項目使用IQKeyboardManager
,那么要擺脫頂部欄,您可以使用IQKeyboardManager.shared().disabledToolbarClasses.add(YourViewController.self)
試試這個,
YourTextField.autocorrectionType = UITextAutocorrectionTypeNo;
從您的UITextField
刪除inputAccessoryView
yourTextField.inputAccessoryview = nil
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.