Hello,
I'm showing a keyboard in my textview and would like to change the appearance of the keyboard after its been displayed.
textView.keyboardAppearance = colorTheme == .classic ? .default : .darkBut it looks like the appearance can only be set before the keyboard is shown.
Is there a way to change the appearnce after the keyboard has appeared?
Please let me know.
Ramon.
I tested in simulator.
Change occurs after resignFirstResponder().
So you can switch with the following:
let previousAppearance = theTextField.keyboardAppearance.rawValue
theTextField.resignFirstResponder()
theTextField.keyboardAppearance = UIKeyboardAppearance(rawValue: (previousAppearance+1) % 4) ?? .default
theTextField.becomeFirstResponder()