How to hide inputAccessoryView without dismissing keyboard

后端 未结 11 1186
挽巷
挽巷 2021-01-02 02:49

I am using a toolbar in the inputAccessoryView property of a textView. When the keyboard shows, it displays the toolbar as expected. When the device is rotated I want to rem

11条回答
  •  青春惊慌失措
    2021-01-02 03:26

    Swift 5

    I use this:

    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { self.view.endEditing(true) return true }

提交回复
热议问题