Home > DeveloperSection > Forums > How to detect specific UITextField after the user click?
Jayden Bell
Jayden Bell

Total Post:110

Posted on    December-20-2015 4:16 AM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 464  View(s)
Rate this:

I have four text fields in our iPhone app. "Did End on Exit" event on each text field calls a single action. Now, how can I know which text-field is called the action.

Can any one tell me how can I detect text-field from sender object which is passed to the action?

Tarun Kumar

Total Post:214

Posted on    December-20-2015 10:54 PM

To find the specific field from a bunch of IBOutlets that are connecting to our UITextFields,
we can simply find them by comparing the sender object.

if(sender == textFieldName){
   // here we can do any operation related to that specific textfield

Don't want to miss updates? Please click the below button!

Follow MindStick