unsigned int count = 0;
Ivar *ivars = class_copyIvarList([UIBarButtonItem class], &count);
for (NSInteger i = 0; i < count; i ++) {
NSLog(@"%s",ivar_getName(ivars[i]));
}
unsigned int count = 0;
Ivar *ivars = class_copyIvarList([UIBarButtonItem class], &count);
for (NSInteger i = 0; i < count; i ++) {
NSLog(@"%s",ivar_getName(ivars[i]));
}
本文标题:获取某个类属性(私有和公有)
本文链接:https://www.haomeiwen.com/subject/clbsfxtx.html
网友评论