I want to get the current view controller in my own method. I mean i have two view controllers which are calling a same method. In that i want to diffentiate from which view controller class is calling that method.
Please help me out
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Lets say
myCommonMethod:is the common function called from both the view controller , you could check yourviewControllerwhether it’s the member of a class or not usingisMemberOfClass:method ofNSObject.