dispatch_group_t group = dispatch_group_create();
dispatch_group_enter(group);
开启异步任务
successBlock{
dispatch_group_leave(group);
}
failedBlock{
dispatch_group_leave(group);
}
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
异步任务完成后 需要做的事情....
});
网友评论