Class NSClassFromString (NSString *aClassName); NSString * NSStringFromClass (Class aClass); NSString * NSStringFromProtocol (Protocol *proto); Protocol *NSProtocolFromString (NSString *namestr); NSString *NSStringFromSelector (SEL aSelector); SEL NSSelectorFromString (NSString *aSelectorName);
// 还有一种转为char型的字符串接口: const char* className = class_getName([yourObject class]);