【发布时间】:2017-07-22 03:33:33
【问题描述】:
我有两个 ViewController。第一个 ViewController 有一个 TableView。我以编程方式呈现第二个 ViewController。在第二个 ViewController 中,我下载了一个图像。现在我在下载完成后关闭第二个 ViewController。同时,我想用图像更新 TableView 并选择特定的单元格。
我已经使用委托来执行此过程。但它无法更新 TableView。
我使用viewDidAppear、viewWillAppear 方法重新加载TableView。但没有效果。
谁能建议我完成这个特定的任务?
我已经通过这种方式展示了我的第二个 ViewController:
ImageSelectionViewController *viewController= [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"modal"];
viewController.modalPresentationStyle = UIModalPresentationCustom;
viewController.carDownloadName = [self.listOfItem objectAtIndex:sender.tag];
[self presentViewController:viewController animated:YES completion:nil];
并以这种方式关闭 ViewController:
[self dismissViewControllerAnimated:YES completion:nil];
【问题讨论】:
标签: objective-c uitableview uiviewcontroller modalviewcontroller uimodalpresentationstyle