Reload tableView after dismiss a viewController

前端 未结 5 948
遇见更好的自我
遇见更好的自我 2021-02-14 14:05

I have a ViewController(VCA) with a TableView inside. From this ViewController it is possibile to call another ViewController (VCB). In this second VC it is possibile add an ite

5条回答
  •  庸人自扰
    2021-02-14 15:00

    Here you are calling table's reload data when the viewcontroller is not yet shown. i.e, Even before you dismissed the viewcontroler VCB and viewcontroller VCA is shown, you are calling reloadData. Try calling reload data in VCA's viewWillAppear(animated: Bool) function.

提交回复
热议问题