Created
June 10, 2016 00:12
-
-
Save Catfish-Man/8285a1705a92b9a0b4dac1b918ac2426 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
#import <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
NS_ROOT_CLASS | |
@interface KVOTest | |
@end | |
@implementation KVOTest | |
@end | |
int main() { | |
id test = class_createInstance(objc_getClass("KVOTest"), 0); | |
[test addObserver:test forKeyPath:@"self" options:0 context:NULL]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2016-06-09 17:11:57.475 rootclasstest[1646:86595] *** NSForwarding: warning: object 0x7fe20b4054c0 of class 'KVOTest' does not implement methodSignatureForSelector: -- did you forget to declare the superclass of 'KVOTest'?
2016-06-09 17:11:57.475 rootclasstest[1646:86595] *** NSForwarding: warning: object 0x7fe20b4054c0 of class 'KVOTest' does not implement doesNotRecognizeSelector: -- abort
fish: './rootclasstest' terminated by signal SIGTRAP (Trace or breakpoint trap)