As I know, in my overloaded method (in category) I may call [super method] to pass it to original class.
In my case I don’t have header file of class, so I write:
@interface OriginalClass : NSObject
@end
@interface OriginalClass (overloadMethod)
-(void) method;
@end
@implementation OriginalClass (overloadMethod)
-(void) method
{
// some my code
[super method]; // here is warning that "NSObject may not respond to '-method'
}
@end
So is it possible to pass method to OriginalClass correctly without having its header file? Maybe it would be better to look at method_setImplementation?
If i remember correctly, the intro to ObjC programming in the docs mentions that when you override a method with a category, you can no longer access the original method.
Your question is pretty much identical to the one here: How do I call the original function from the overloaded function in a category?
Note the quote from the docs in the first answer