Quote:
Originally Posted by codeflakes
In Ruby when a class receives a message that it does not implement, the method_missing method is called so you can react to this.
Is there a way to do the same in objective C ?
|
You can set a forwarding target for all unrecognized messages:
Code:
- (id)forwardingTargetForSelector:(SEL)aSelector
Or you can check unrecognized messages and repsond to them by defining
Code:
- (void)forwardInvocation:(NSInvocation *)anInvocation
There's a little example here
Mac Dev Center: NSObject Class Reference