objective c - Cocoa, NSProxy, How to take over a method in an object? -
I need to convert a method to an object with its own implementation. For example,
< Pre> person * p; // some object NSMutableArray * array = [NSMutableArray array]; [Array addObject: p];
How do I change addObject with one of my own methods?
In other words, is there a way to change the implementation of addObject:
of a specific object with another implementation?
I'm playing around NSProxy
but I did not know what I should do.
Any help would be highly appreciated.
Thanks
With a different implementation for that method, Make an example of the square.
Comments
Post a Comment