Created
February 26, 2012 07:13
-
-
Save plantpurecode/1914668 to your computer and use it in GitHub Desktop.
Safe message invocation, untested
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
@interface JRObject : NSObject @end | |
@implementation JRObject | |
- (void)doesNotRecognizeSelector:(SEL)selector { | |
NSLog(@"Attempted to invoke %s on %@", selector, self); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can then extend
JRObject
and you won't get any more unrecognized selector runtime exceptions. Of course, this is not recommended practice. ;)