I am making an app in xCode using Swift, and I need help with something. How do I program a UIButton that I added on a Scene on my Storyboard to navigate towards the previously used Scene (there are more than one Scenes in my app).For Example; if Im in scene3 and I'm navigated towards the scene with the UIButton, how can I program it to take me back to scene3 instead of the main menu? Or if I were in Scene2 and was navigated to the Scene with the UIButton, and I want it to take me to Scene2 instead of Scene3 or Main Menu.
Thank you
The Blue Scenes represent the levelScenes that will lead to the redScene after the level is done, however I want the UIButton to lead back to the exact same levelScene after it is pressed