runtime获取一个控件的所有属性

控件的有些属性API并没有开放,可以通过runtime查看:

 unsigned int count;
        Ivar *ivarList = class_copyIvarList([UITextField class], &count);
        for (int i = 0; i < count; i++) {
            Ivar ivar = ivarList[i];
            NSLog(@"%s", ivar_getName(ivar));
        }
        free(ivarList);
原文地址:https://www.cnblogs.com/yintingting/p/5467360.html