SwiftUI: iPad Views Not Showing

With the release of SwiftUI, the idea was to have one programming language for all apple devices. One small detail a lot of people may look over is when building with NavigationViews, on iPhone they will always show up on the top of the screen like normal. But in iPadOS, the default style is for the master view, (view that the NavigationView is the parent of), to be off screen and accessed with a swipe from the left side.

So either you will want this functionality, or you can force edit the iPadOS NavigationViews to render like the iOS ones with the following modifier on the NavigationView:


Full Example:

NavigationView {

Leave a Reply

Your email address will not be published. Required fields are marked *