UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: How to Handle Navigation

Forums > SwiftUI

I have a question regarding Navigation that I dont know how to handle the way (I am not looking for the actually code just the right direction so to say).

I have an app where you on the start by clicking a button to add a new item, there after you have 4 views of information to fill in before the item is created are you should be taken back to the startscreen.

Atm I handle this by a simple navigationview and NavigationLink however this feels wrong since you are creating an item, also I am not sure how to go from the last view all the way back to the startscreen.

So my question is this the best way to handle a creation of item that consists of 4 views and how do I handle the last navigation to make it go all the way back?

2      

You could do this:

From your start screen, present a sheet that contains a NavigationView and then navigate through your four screens of info there. When the user is done, the sheet gets dismissed and you are back at your start screen.

2      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.