Why does my unwind segue go back too far?

前端 未结 1 1311
误落风尘
误落风尘 2021-01-20 22:19

I\'m trying to create the controller architecture for the signup process of my app. Below is an image of the current state:

The app starts at a login page t

相关标签:
1条回答
  • 2021-01-20 22:57

    I had this same issue and it was usually caused by one of the following reasons:

    1. Using a deprecated segue
    2. Calling viewController.dismissViewControllerAnimated inside the @IBAction method used for unwind.
    3. Having the @IBAction used for unwind in the wrong controller. The @IBAction should in the controller you want to unwind to.

    Steps to unwind a segue

    1. Create an @IBAction method in SecondSignupController this method will be called upon unwind. This method should take a UIStoryboardSegue as an argument example -> @IBAction func onUnwindFromModalPage(segue:UIStoryboardSegue){}. The main purpose of this method is to pass back data if any otherwise you can leave it empty.

    2. Control-Drag from Go-Back button to exit symbol in the Modally Presented Controller in storyboard. The exit symbol is the last symbol on top of the controller when a controller is selected. This will show you a list of @IBActions that you can choose for unwind. Choose the method you created in the SecondSignUpController.

    0 讨论(0)
提交回复
热议问题