Reputation: 611
Is it possible to increase the default width of the master view in SwiftUI split view implemented with NavigationView on iPad?
NavigationView {
masterView
detailView
}
Upvotes: 1
Views: 489
Reputation: 36
To change the default width of the master view you may install SwiftUI-Introspect and add this to your NavigationView:
.introspectNavigationController { navigationController in
navigationController.splitViewController?.preferredPrimaryColumnWidthFraction = 1
navigationController.splitViewController?.maximumPrimaryColumnWidth = *preferred width*
}
Upvotes: 1