1.获取私有成员变量
1 unsigned int num = 0; 2 Ivar *ivars = class_copyIvarList([UITextField class], &num); 3 for (int i=0; i<num; i++) { 4 Ivar ivar = *(ivars+i); 5 KKLog(@"%s",ivar_getName(ivar)); 6 } 7 free(ivars);