关于多线程上传多个图片|关于多线程上传多个图片,服务器只支持每次上传一张图

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
for (int i =0; i 【关于多线程上传多个图片|关于多线程上传多个图片,服务器只支持每次上传一张图】{
dispatch_async(queue, ^{


NSDictionary*Dict=[TYNetWorkProtocol tyUploadImageWithImageData:base64StringArr[i] ext:@"png"];
[HTTPManager postRequestWithProtoPic:Dict successHandler:^(NSDictionary *resposed)
{
if ([resposed[@"result"] integerValue]==1)
{
[weakSelf.MutablePicArr addObject:resposed[@"data"]];
if (weakSelf.MutablePicArr.count==base64StringArr.count)
{
NSSLog(@"**全部添加,退出循环**");
[self hideHud];
[self confirmtupic];
}
}
} failHandler:^{
[weakSelf showHudWithHint:@"图片上传失败,请重试!"];
}];


});
}

    推荐阅读