- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
in addition to
- (void)forwardInvocation:(NSInvocation *)anInvocation
Another problem is that sometimes calling objects will use
- (BOOL)respondsToSelector:(SEL)aSelector
to determine if your proxy object can respond to a particular selector. The problem is that even if you forward that selector, because the message isn't actually sent, the default implementation of
respondsToSelector
will return NO
, causing the forwarding to fail. Therefore you should also override respondsToSelector
.Cheers,
Steve