Skip to content

Instantly share code, notes, and snippets.

@plantpurecode
Created February 26, 2012 07:13
Show Gist options
  • Save plantpurecode/1914668 to your computer and use it in GitHub Desktop.
Save plantpurecode/1914668 to your computer and use it in GitHub Desktop.
Safe message invocation, untested
@interface JRObject : NSObject @end
@implementation JRObject
- (void)doesNotRecognizeSelector:(SEL)selector {
NSLog(@"Attempted to invoke %s on %@", selector, self);
}
@end
@plantpurecode
Copy link
Author

You can then extend JRObject and you won't get any more unrecognized selector runtime exceptions. Of course, this is not recommended practice. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment