dispatch_queue_t dispatchQueue

dispatch_queue_t dispatchQueue = dispatch_queue_create("activityQueue", DISPATCH_QUEUE_CONCURRENT);
dispatch_group_t dispatchGroup = dispatch_group_create();
dispatch_group_async(dispatchGroup, dispatchQueue, ^(){
NSLog(@"dispatch_group_notify====Start");
[XMActivityCenterNetTool getActivityDetailByActivityId:[NSString stringWithFormat:@"%zd",self.activityId] Success:^(XMActDetailsItem *activityItem) {
//隐藏无数据的占位提示图片
[self hideEmptyView];
self.activityItem=activityItem;

        //设置头部head的frame
        CGFloat headHeigh=686;
        
        //不需要报名就是 现场参加,此时需要减去"已报名"整体的高度 55
        if (!self.activityItem.info.is_signup) {
            headHeigh -=55;
        }
        //如果活动的名字是2排那么高度需要加30
        CGSize nameSize= [CommonUtills sizeWithString:self.activityItem.info.activity_name font:[UIFont systemFontOfSize:22 weight:UIFontWeightSemibold] maxSize:CGSizeMake(SCREEN_W-40, CGFLOAT_MAX)];
        if (nameSize.height>35) {
            headHeigh +=30;
        }
        self.headView.frame =CGRectMake(0, 0, SCREEN_W, headHeigh);
        self.headView.item=self.activityItem;
        self.myTableView.tableHeaderView = self.headView;
        
        //设置尾部数据
        self.footView.item=self.activityItem;
        self.myTableView.tableFooterView = self.footView;
        
        //底部
        self.bottomView.item=self.activityItem;
        [self.view addSubview:self.bottomView];
        
        //XMLog(@"activityItem:activityItem:activityItem:activityItem:activityItem:");
        
       
        
    } handleFalse:^(NSError *error) {
        self.navView.rightButton.hidden=YES;
        NSDictionary *userInfo = error.userInfo;
        if ([userInfo[@"code"] isEqual: @1123]) {
            //活动已下架
            [self showEmptyViewInView:self.myTableView];
            
        }
    }];
    
    //处理键盘
    [self handlerKeyboard];
    
});

dispatch_group_notify(dispatchGroup, dispatch_get_main_queue(), ^(){
    NSLog(@"dispatch_group_notify====end");
    //更新报名数量和报名列表
    [self getActSignUpList];
});

你可能感兴趣的:(dispatch_queue_t dispatchQueue)