HOW TO DETECT SPECIFIC UITEXTFIELD AFTER THE USER CLICK?

Jayden Bell

Total Post:110

Points:774
Posted by  Jayden Bell
 499  View(s)
Ratings:
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?

  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to detect specific UITextField after the user click?

    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.
    Ex:

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!