How to get a reference to a method's caller object from within the method in Objective-C
- by shakeelw
Hi guys. I have a few text fields and text views on my application's view. The keyboard comes up when I click in anyone of them. I have a method that gets called when any one of these objects is tapped in. However, I would like the method to execute its code only if the a certain Text Field(s) or a certain Text View(s) is tapped in. I would therefore like to have something like this in the method body:
{
if(currentField != mySpecialField)
{return;}
//Rest of the method code...
}
Now, my question is, how do I get a reference to the currently tapped in field so that I can perform the if-check.
Thanks guys. I'm a total noobee in Objective-C. :(