Reading time: 3 min
This recipe shows how to implement navigation in SwiftUI using NavigationStack. It makes both declarative and programmatic navigation dead easy, allowing for simple transitions both forwards and backwards, including a full stack unwind.
NavigationStack is SwiftUI 4 replacement for
NavigationView which successfuly improves many of its predecessor's shortcomings, namely in the realm of programmatic navigation. If you're interested in a feature-rich replacement for
NavigationView, check out our SwiftUI Segues recipe.
Reading time: 1 min
This quick recipe shows how to support nested NavigationLinks and allow the user to move back programatically. As always, SwiftUI throws a curveball even on trivial tasks such as this.
Reading time: 6 min
This recipe shows how to add easy-to-use segues to your SwiftUI navigation. They allow for presenting views using common UIKIt Segue types - push, modal and popover.
Side menu in SwiftUI (updated 05/21)
Reading time: 4 min
This tutorial shows how to create a side menu (or navigation drawer, as it's known on Android), in SwiftUI. It's also a good showcase of using
GeometryReader to offset views and
DragGesture to detect user gestures.
Navigation bar styling in SwiftUI
Reading time: 2 min
This tutorial shows how to style a navigation bar in SwiftUI - changing its background color, text color, as well as styling the status bar.