I have created a UIToolBar
programmatically and added a UITextField
on it. Now, I need that toolbar to be above the keyboard when I click in anothe
You do not need to do this in code anymore.
In code simply put IBOutlet
for both: toolbarView
and textView
and make connections.
@IBOutlet private var toolbarView: UIView!
@IBOutlet private var textView: UITextView!
In viewDidLoad
setup your toolbarView as accessoryView of your UItextView
.
override func viewDidLoad() {
super.viewDidLoad()
textView.inputAccessoryView = toolbarView
}
The result is following: