You could build a class dynamically at runtime, that subclasses some know class. Then add methods to it to override methods from the baseclass, then swtich a sepcific instance of the base class to your new derived class.
This may sound like a hack, but it is a much more appropriate hack than the sledgehammer that was poseAs:. Its also much more appropriate than smashing a method with a category.
by Jon Hess — Oct 26
This may sound like a hack, but it is a much more appropriate hack than the sledgehammer that was poseAs:. Its also much more appropriate than smashing a method with a category.