I was learning objective-c and found that I could call some methods of NSObject, but can't find them in the documentation. Such as the method valueForKey
NSObject *obj = [[NSObject alloc]init];
NSLog(@"%@", [obj valueForKey:@"class"]);
will print the class name. However NSObject seems not have method valueForKey https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/index.html
Actually the protocal NSKeyValueCoding has that method but it seems the NSObject conforms only to NSObject protocal. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/index.html
Could anyone explain?