Is there a way to simulate a press to the "return" key programmatically, e.g. call the function(s) that are called by UITextField/UIKeyboard/whatever when the user presses the return key?
I know that somewhere inside the routine textFieldShouldReturn
is called, but I assume that's not the only thing happening? I briefly stepped through the debugger and it seems that a press on the "return" key calls far more than one function.
What I'm looking for is a way to have a UITextField subclass, and in this subclass, I can call something like [self.inputview returnKeyPressed]
, and this function will do exactly the same as would have happened had the user pressed on the return key.