Swift – Using popViewController and passing data to the ViewController you're returning to

后端 未结 4 1449
孤街浪徒
孤街浪徒 2021-01-12 03:45

I have an optional bool variable called showSettings on my first view controller which is called ViewController, and I\'m popping from

4条回答
  •  情深已故
    2021-01-12 03:59

    _ = self.navigationController?.popViewController(animated: true)
            let previousViewController = self.navigationController?.viewControllers.last as! PreviousViewController
            previousViewController.PropertyOrMethod
    

提交回复
热议问题