dispatch_group_t group = dispatch_group_create();
dispatch_group_enter(group);
dispatch_async(dispatch_get_global_queue(0, 0), ^{
self.arr_DB = [[SearchHistoryDB getInstance] getAllData];
dispatch_group_leave(group);
});
dispatch_group_enter(group);
dispatch_async(dispatch_get_global_queue(0, 0), ^{
[ClassHttpTool rmssSearchWithSuccess:^(NSArray *arr) {
self.arr_RM = [arr mutableCopy];
dispatch_group_leave(group);
} failure:^(NSInteger code, NSString *desc) {
dispatch_group_leave(group);
}];
});
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
NSLog(@"任务完成");
[self drawHeaderView];
});