swift4:根据从另一个视图控制器传递的单元格编号,将图像显示到tableview中的特定单元格

时间:2018-11-08 02:29:39

标签: ios swift

我创建了2个视图控制器(ViewController和SecondViewController)。

ViewController使用TableView代表不同城市的名称。每个单元格都有一个标签和ImageView(隐藏)。  用户单击单元格后,应用程序将移至SecondViewController,该窗口将显示有关城市的信息。 (还具有-back button-和-favourite button-)。 用户可以在SecondViewController中单击“收藏夹”按钮,使该城市成为收藏夹。

我想问的是,一旦用户单击“收藏夹”按钮,如何仅在ViewController中显示此单元格-city-的ImageView? 注意:除非单击后退按钮,否则用户将保留在SecondViewController中。

0 个答案:

没有答案