Skip to content

Instantly share code, notes, and snippets.

@natemartinsf
Created April 9, 2010 06:17
Show Gist options
  • Save natemartinsf/360932 to your computer and use it in GitHub Desktop.
Save natemartinsf/360932 to your computer and use it in GitHub Desktop.
- (id)forwardInvocation:(CPInvocation)anInvocation
{
CPLog(@"Forwarding invocation from %@ to %@", self, _realObject);
var aSelector = [anInvocation selector];
if ([_realObject respondsToSelector:aSelector])
{
[anInvocation invokeWithTarget:_realObject];
CPLog(@"finished invocation");
CPLog(@"Return value is: %@", [anInvocation returnValue]);
return [anInvocation returnValue];
}
else
{
[self doesNotRecognizeSelector:aSelector];
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment