iOS 获取所有私有变量
2017-09-11 本文已影响175人
透支未来
unsigned int count = 0;
Method *memberFuncs = class_copyMethodList([MKMapView class], &count);
for (int i = 0; i < count; i++)
{
SEL address = method_getName(memberFuncs[i]);
NSString *methodName = [NSString stringWithCString:sel_getName(address) encoding:NSUTF8StringEncoding];
NSLog(@"member method : %@",methodName);
}