I have some weird UI bug with inputAccessoryView
and keyboard.
Code to add inputAccessoryView
in viewDidLoad
let keyboardToolbar = UIToolbar()
keyboardToolbar.items = [
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
UIBarButtonItem(title: "Hide", style: .done, target: self, action: #selector(resignFirstResponder))
]
keyboardToolbar.barStyle = barStyle
keyboardToolbar.sizeToFit()
myTextfield.inputAccessoryView = keyboardToolbar
First time entering screen and tap to textfield works good. After closing this screen (popViewController) and entering it again and get focus to textField I've got this: UIToolBar is above keyboard. Empty space have height = keyboard height
ui bug image