我用一个for循环上传三张照片(用的是afnetworking框架)。上传它就开了一个线程,上传成功后后台返回一个filename,把filename放进一个数组我想等三张照片全都上传结束后,对获取到的三个filename进行操作要怎么做?NSMutableArray*fileNameArr=[[NSMutableArrayalloc]init];for(inti=0;i<[self.imgArrcount];i++){NSData*data=[self.imgArrobjectAtIndex:i];[managerPOST:urlparameters:nilconstructingBodyWithBlock:^(idformData){ [formDataappendPartWithFileData:dataname:@"pic"fileName:fileNamemimeType:@"image/jpeg"];}success:^(AFHTTPRequestOperation*operation,idresponseObject){NSLog(@"success:%@",responseObject);NSString*str=[[responseObjectobjectForKey:@"data"]objectForKey:@"fileName"];[fileNameArraddObject:str];NSString*ids=[[responseObjectobjectForKey:@"data"]objectForKey:@"ids"];}failure:^(AFHTTPRequestOperation*operation,NSError*error){NSLog(@"%@",error);}];}
红颜莎娜
相关分类