I am doing the messaging with the option sending photo, Once the image is picking it will be upload to the server and also display on the chatTableview list. However I want the cell of chatTableview display the progress of photo uploading as well. Could anyone share me the idea how can I update the cell of chatTableview according the status of photo uploading, like in wechat ?enter link description here
Asked
Active
Viewed 51 times
1 Answers
0
hi,you may be able to use multithreading~ For example,
NSBlockOperation *operation1 = [NSBlockOperation blockOperationWithBlock:^{
NSLog(@"sending photo and update the progress of photo - %@", [NSThread currentThread]);
......
}];
NSBlockOperation *operation2 = [NSBlockOperation blockOperationWithBlock:^{
NSLog(@"doing the messaging - %@", [NSThread currentThread]);
......
}];
NSOperationQueue *queue = [[NSOperationQueue alloc] init];
[queue addOperations:@[operation1, operation2] waitUntilFinished:NO];

yuan zhao
- 56
- 4