Search code examples
uitableviewfirst-responderbecomefirstresponder

Identify the UITextField with first responder in my current UIView


I have more than 5 text fields in my registration view to get input from the user & the user can choose to edit any of the text field of the available 5.

At any instance in my application, I want to get the UITextField(or a reference of the UITextField) with is the acting as the current first responder in the registration UIView(self.view)

Appreciate any assistance.


Solution

  • I mainly wanted to remove the current active responder in my view. The below code helped me achieve that.

     [self.view endEditing:YES];
    

    Thanks for Stackover flow again.