用字典生成model的代码

//用字典生成model的代码

-(void)createModelCodeWithDictionary:(NSDictionary *)dict modelName:(NSString *)modelName{

    printf("\n@interface %s : Jastor\n",modelName.UTF8String);

    for (NSString *key in dict) {

        printf("@property (nonatomic, strong) NSString *%s;\n",key.UTF8String);

    }

    printf("@end\n");

    

}

posted @ 2017-02-07 17:44  二十几岁的某一天  阅读(128)  评论(0)    收藏  举报