In Objective-C, if I override a class method using a category, is there a way I can call the original method (the one that was overridden)?
Share
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.
I present you with three icky ways to do this in
+(void)load. In every case, name your method MyCategory_method or so.Sometimes, it’s the only reasonably easy way to make it do what you want…
EDIT: And only do this if you know what you’re doing!