PicTextModel.m 879 Bytes
Newer Older
admin's avatar
admin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//
//  PicTextModel.m
//  redstar
//
//  Created by admin on 15/12/14.
//  Copyright © 2015年 ZWF. All rights reserved.
//

#import "PicTextModel.h"

@implementation PicTextModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key  {
    if([key isEqualToString:@"description"])
        self.descriptionText = value;
}
admin's avatar
admin committed
16

admin's avatar
admin committed
17 18 19 20 21 22 23 24 25 26 27 28
//- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues{
//    Class cls = self.class;
//    for (NSString *key in keyedValues.allKeys) {
//        NSString *varName = [NSString stringWithFormat:@"_%@", key];
//        NSLog(@"varName ===== %@", varName);
//        const char *c_key = [varName cStringUsingEncoding:NSUTF8StringEncoding];
//        Ivar var = class_getInstanceVariable(cls, c_key);
//        if (var) {
//            [self setValue:[keyedValues objectForKey:key] forKey:key];
//        }
//    }
//}
admin's avatar
admin committed
29
@end