I have created a custom inputView and have a Done button. Does anyone know how I can wire the done button up to work the same as a return key on the built in keyboard.
I basically need to get the textFieldShouldReturn method to fire for a UITextField.
I know I can call resignFirstResponder on the textfield, but this does not fire the textField开发者_Python百科ShouldReturn method.
If it's a custom input view, and a custom "Done" button, why do you need to use the text field delegate methods? You can wire the done button to your own action.
If you have some common code in your textFieldShouldReturn
method this could be moved out to another method which can be called from the delegate method and your new action.
精彩评论