In my viewDidAppear, how do I know when it's being unwound by a child?

前端 未结 6 1339
一向
一向 2021-01-01 13:36

When my child performs an unwind segue, my controller\'s viewDidAppear gets called.

In this method (and this method alone, I need to know whether it was from an unwi

6条回答
  •  醉酒成梦
    2021-01-01 14:32

    You can override the function unwindForSegue:towardsViewController:, which is called when the ViewController is on the path of an unwind segue. It's meant to be used to reconfigure the ViewController.

    Swift example:

    override func unwind(for unwindSegue: UIStoryboardSegue, towardsViewController subsequentVC: UIViewController) {
    }
    

提交回复
热议问题