#import #include #include @interface Hehe : NSObject - (void)bar; - (void)tobehijacked:(NSString*)input; @end @interface Hooker : Hehe @end @implementation Hehe - (void)bar { NSLog(@"Invoke instance method %@", self); } - (void)tobehijacked:(NSString*)input { NSLog(@"Invoke tobehijacked method %@", input); } @end @implementation Hooker - (void)tobehijacked:(NSString*)input { NSLog(@"Hijacked tobehijacked method %@ from Hooker", input); } - (void)bar { [super bar]; } @end