Reputation: 435
Is there a way to disable the SplitView using SwiftUI on iPad inside a navigation view?
Upvotes: 17
Views: 6500
Reputation: 29242
By setting the NavigationViewStyle
import SwiftUI
struct NavView: View {
var body: some View {
NavigationView{
List{
NavigationLink(destination: TestView(), label: {Text("TestView")})
}
}.navigationViewStyle(StackNavigationViewStyle())
}
}
struct NavView_Previews: PreviewProvider {
static var previews: some View {
NavView()
}
}
Upvotes: 46