Automate Your Builds and Testing with Bitrise
Creating a Master Detail View with Navigation
September 29, 2019 · 1 min read
You are creating an application using SwiftUI and need to have a master detail view with navigation between them.
This is something that SwiftUI has really simplified, we do not need to worry about storyboards or prepareForSegue and all the code that goes with that.
It now just takes a few lines of code using a NavigationView and NavigationLink to have a working system in very little time.
- Wrap the view in a
- Add a
NavigationLinktag to the item you want to touch on to perform the navigation
- Create the detail view that you will be navigating to during step 2