NSLog(@"获取指定类所在动态库");
NSLog(@"UIView's Framework: %s", class_getImageName(NSClassFromString(@"AppDelegate")));
NSLog(@"获取指定库或框架中所有类的类名");
unsigned int outCount = 0;
const char ** classes = objc_copyClassNamesForImage(class_getImageName(NSClassFromString(@"AppDelegate")), &outCount);
for (int i = 0; i < outCount; i++) {
NSLog(@"class name: %s", classes[i]);
}
网友评论