In the previous session, we set the transition in the second scenario by selecting the modal type, not push. So the user will need to return manually after input. There are two buttons on the navigation bar, complete and canceled. So we're going to reverse the two buttons, we need to add @ibaction at the source of the event. The code is as follows:
@IBAction func unwindtolist (segue:uistoryboardsegue) { }
The above code should be added to Restaurantlistviewcontroller, unwindtolist represents a reverse transition. Then go back to storyboard, choose the new restaurant page, control drag two buttons to the top of exit, will pop up the method we just defined, select:
Run it and see if you can return. Now that the contents of the table are gone, we select the table, change the static content to dynamic, and prepare for the work behind it.
Swift UI Special Training 6 Reverse transition