自定义model 转出 字典

来源:互联网 发布:php 符号 编辑:程序博客网 时间:2024/05/01 21:48

一般 都是 字典转出 Model  但是Model 也能转出 字典

unsigned int count;    objc_property_t *properties = class_copyPropertyList([youModelClass class], &count);    for(int i = 0; i < count; i++)    {        objc_property_t property = properties[i];                NSLog(@"name:%s",property_getName(property));        NSLog(@"attributes:%s",property_getAttributes(property));                NSString *name = [NSString stringWithUTF8String:property_getName(property)];        NSString *attributes = [NSString stringWithUTF8String:property_getAttributes(property)];    }    free(properties);


0 0
原创粉丝点击