I need to replace a method in an object with my own implementation. For example,
Person *p; // some object
NSMutableArray *array = [NSMutableArray array];
[array addObject: p];
How can I replace addObject with a method of my own?
In other words, is there a way to replace the implementation of addObject:
of a SPECIFIC object with another implementation?
I have been playing around with NSProxy
but couldnt find out what I should do.
Any help will be highly appreciated.
Thanks