美文网首页
AFNetwoking 注意

AFNetwoking 注意

作者: 西西西瓜 | 来源:发表于2016-07-29 20:07 被阅读34次

'''oc

dispatch_group_tgroup =dispatch_group_create();

dispatch_group_async(group,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{

dispatch_semaphore_tsemaphore =dispatch_semaphore_create(0);

for(NSIntegeri =0; i <9; i++) {

//dispatch_group_enter(group);

[weakSelfrequestUploadWeiboImage:i

completeBlock:^(boolsuccess) {

//dispatch_group_leave(group);

dispatch_semaphore_signal(semaphore);

}];

DebugLog(@"===== %ld", i);

//[];

dispatch_semaphore_wait(semaphore,DISPATCH_TIME_FOREVER);

}

});

dispatch_group_notify(group,dispatch_get_main_queue(), ^{

NSLog(@"上传完成!");

//for (id response in result) {

//NSLog(@"%@", response);

//}

});

'''

相关文章

网友评论

      本文标题:AFNetwoking 注意

      本文链接:https://www.haomeiwen.com/subject/pyrxhttx.html