TaskGroup.m 732 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
//
//  TaskGroup.m
//  redstar
//
//  Created by admin on 15/11/12.
//  Copyright © 2015年 ZWF. All rights reserved.
//

#import "TaskGroup.h"
#import "TaskModel.h"

@implementation TaskGroup

+ (instancetype)taskGroupWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
        
        NSMutableArray *tempArray = [NSMutableArray array];
25
        for (NSDictionary *dict in _answers) {
26 27 28
            TaskModel *friend = [TaskModel taskModelWithDict:dict];
            [tempArray addObject:friend];
        }
29
        _answers = tempArray;
30 31 32 33 34
    }
    return self;
}

@end