Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SwiftUI NavigationView on the iPad Pro

Tags:

swiftui

I use the Apple SwiftUI tutorial code. Then I set the previewDevice to iPad Pro (12.9-inch). But the preview has something wrong. Does anyone know where the problem is?

SwiftUI preview issue

like image 702
Jerry Lee Avatar asked Jul 16 '19 02:07

Jerry Lee


1 Answers

You can override the default splitView used on iPad, by having the NavigationView display the same stacked view you see on iPhone, by setting .navigationViewStyle(StackNavigationViewStyle())

Quite helpful during development and debugging, and when you have not developed the detailedView() yet.

like image 65
Sondergaard Avatar answered Oct 25 '22 20:10

Sondergaard