0

i want to form a textfield in my view controller. After user make his input to this text field and press return or dismiss keyboard with touching to the screen, an action must be done. how can i implement that? i want that code to be executed for making global variable when keyboard dismiss:

 [(AppDelegate *)[[UIApplication sharedApplication] delegate] SomeVariable:SomeVariableTextField];

note: SomeVariable is a number but if there is no way to form a NSNumber variable with textfield i can use NSNumberFormatter.

ananana
  • 15
  • 7

1 Answers1

0

Pressing return will call this "Did End and Exit" event,so you can just ctrl-drag the UITextField to the code,and implement the method.

David Hx
  • 125
  • 1
  • 2
  • 12