UIKit text input components, such as UITextView
and UITextField
have a property inputView
to add a custom keyboard. There are two questions I have relating to this.
If the keyboard is currently visible and the property is set to a new input view, nothing happens. Resigning and regaining first responder status refreshes the input and displays the new view. Is this the best way to do it? If so it might answer my bigger question:
Is it possible to animate the transition between two input views?
From the UIResponder docs:
So unfortunately the answer to 1 is Yes and 2 is No.
Actually there is a method to do it cleanly:
UIResponder
'sreloadInputViews
, available from iOS 3.2!I think you can animated it with some extra work:
UIWindowLevel
than the keyboard window.inputView
and refresh the first responder as you do.Your custom keyboard will change its parent view from your custom window to the keyboard one, but hopefully the user won't notice ;)