3

How do you catch the "Enter" key event on a UITextFIeld on the iPad?

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
MikeN
  • 45,039
  • 49
  • 151
  • 227

1 Answers1

4

Implement the -textFieldShouldReturn: delegate method, declared in the UITextFieldDelegate protocol. To make an object the delegate of the text field, set the field's delegate property to that object.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
  • Good discussion with sample code here: http://forums.macrumors.com/showthread.php?t=462104 – MikeN Apr 29 '10 at 17:38