Created
September 7, 2014 09:48
-
-
Save fjolnir/7412e8a8926d83d81fad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (id)forwardingTargetForSelector:(SEL const)aSelector | |
{ | |
if( aSelector == @selector(a) | |
|| aSelector == @selector(b) | |
|| aSelector == @selector(c)) | |
return _wrappedObject; | |
else | |
return nil; | |
} | |
- (void)setValue:(id const)aValue forUndefinedKey:(NSString * const)aKey | |
{ | |
@try { | |
[_wrappedObject setValue:aValue forKey:aKey]; | |
} @catch(NSException *ignored) { | |
[super setValue:aValue forUndefinedKey:aKey]; | |
} | |
} | |
- (id)valueForUndefinedKey:(NSString * const)aKey | |
{ | |
@try { | |
return [_wrappedObject valueForKey:aKey]; | |
} @catch(NSException *ignored) { | |
return [super valueForUndefinedKey:aKey]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment