Slide 56
Slide 56 text
ϝοηʔδૹ৴
self.dispatchGroup = dispatch_group_create();
// attributedString͔Βը૾Λநग़
if (images.count > 0) {
for (UIImage *tmpImage in images) {
[self sendImage:tmpImage];
}
}
dispatch_group_notify(self.dispatchGroup, dispatch_get_main_queue(), ^{
[self operationDidFinishWithAttributedString:attributedString
indexPath:indexPath];
});
dispatch_group_enter(self.dispatchGroup);
// snip
AFHTTPRequestOperation *operation =
[client HTTPRequestOperationWithRequest:request
success:^(AFHTTPRequestOperation *operation, id responseObject) {
// snip
dispatch_group_leave(self.dispatchGroup);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
dispatch_group_leave(self.dispatchGroup);
}];
[self.messageQueue addOperation:operation];
άϧʔϓͷ࡞