Using the keyboard -- setting target - action with Done button on the keyboard
I've been looking through documentation and sample code and it almost always uses an external button to dismiss the keyboard and return what's in the text. I want to know how you set the target-action on the "Done" or "Return" or whatever button on the keyboard so that when you're done typing, the keyboard disappears, the view changes, the text is returned etc.
How do you access that "Done" button?
I also tried
[userNameInput addTarget:self action:@selector(editingOver: ) forControlEvents:UIControlEventEditingDidEndOnExit];
but the control event doesn't seem to return unless you actually exit the text field...?
I think my main problem is setting the target - action method... I tried with a simple button, couldn't get it to work...
Thanks
Last edited by shimmy; 09-08-2009 at 01:12 PM.
|