Is there an simple way to use the UISplitViewController with SwiftUI?
Currently I use a NavigationView. The problem is, that the ListView on the left only shows in landscape mode and not in portrait mode.
This is the example of my code:
I tested it with a padding after navigationViewStyle but the List View only displays in landscape mode.
Currently I use a NavigationView. The problem is, that the ListView on the left only shows in landscape mode and not in portrait mode.
This is the example of my code:
Code Block SwiftUI import SwiftUI struct ContentView: View { var body: some View { NavigationView { ListView() DetailView() }.navigationViewStyle(DoubleColumnNavigationViewStyle()) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } struct ListView: View { var body: some View { List(0 ..< 5) { item in NavigationLink(destination: DetailView()) { Text("List Item") } } .navigationTitle("My List") } } struct DetailView: View { var body: some View { Text("Hallo") } }
I tested it with a padding after navigationViewStyle but the List View only displays in landscape mode.