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?
textInputView
property is read-only. It can't be changed. When focus changes from one field to another, you are dealing with a whole new instance of aUITextInput
based object. – Winsome@property (readwrite, retain) UIView *inputView;
Switching it works just fine, it just doesn't update the view hierarchy until the next time the input becomes first responder. – AbutmentUITextField inputView
andUITextInput textInputView
. They are not the same thing. But you are correct that changing theinputView
property ofUITextField
andUITextView
doesn't take affect if the field/view is already the first responder. – WinsomeinputView
? – Abutment