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);
    }
上一篇下一篇

猜你喜欢

热点阅读