Created
May 2, 2013 05:16
-
-
Save vkodocha/5500276 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) startForwarding:(id)sender { | |
for (NSInvocation *invocation in self.invocations) { | |
[invocation setTarget:sender]; | |
[invocation invoke]; | |
} | |
// We now need to also set the properties of the superclass | |
Class sc = [sender superclass]; | |
while (sc != [NSObject class]) { | |
[(FLAppearance *)[FLAppearance appearanceForClass:sc] startForwardingInternal:sender]; | |
sc = [sc superclass]; | |
} | |
} | |
- (void) startForwardingInternal:(id)sender { | |
for (NSInvocation *invocation in self.invocations) { | |
[invocation setTarget:sender]; | |
[invocation invoke]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment