Reload tableView after dismiss a viewController

前端 未结 5 942
遇见更好的自我
遇见更好的自我 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 14:50

    Try this: make changes as below

    let addItemVC : VCB? = nil
    

    In ViewDidLoad

     override func viewDidLoad() {
                super.viewDidLoad()
                addItemVC = (storyboard?.instantiateViewController(withIdentifier: "ViewControllerID") as! SelectionViewController?)! // change ViewControllerID with your controller id
                addItemVC.delegate = self
    
        }
    

提交回复
热议问题