我正在使用发送照片选项进行消息传递,一旦选择图像,它将被上传到服务器并显示在 chatTableview 列表中。但是我希望chatTableview 的单元格也显示照片上传的进度。谁能分享我的想法如何根据照片上传的状态更新chatTableview的单元格,比如在微信中?在此处输入链接描述
问问题
48 次
1 回答
0
你好,你也许可以使用多线程~例如,
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];
于 2016-08-29T15:25:52.017 回答