methodSignatureForSelector:
Raises NSInvalidArgumentException. Override this method in your concrete subclass to return a proper NSMethodSignature object for the given selector and the class your proxy objects stand in for.
Declaration
- (NSMethodSignature *) methodSignatureForSelector:(SEL) sel;Parameters
- sel:
The selector for which to return a method signature.
Return Value
Not applicable. The implementation provided by NSProxy raises an exception.
Discussion
Be sure to avoid an infinite loop when necessary by checking that sel isn’t the selector for this method itself and by not sending any message that might invoke this method.
For example, if your proxy merely forwards messages to an instance variable named realObject, it can implement methodSignatureForSelector: like this:
– (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
return [realObject methodSignatureForSelector:aSelector];
}