on-internet
← Community

NavigationSplitViewVisibility.detailOnly not working in macOS

Stack Overflow ·

I've been having lots of problems with NavigationSplitView in SwiftUI under macOS (14.3 if it matters). The latest one is this: NavigationSplitViewVisibility.detailOnly doesn't seem to do anything, it just reverts to showing the 3 original columns. If anyone knows how to actually trigger NavigationSplitView to only display the detail area I will be eternally grateful. This is the code that is not working: import SwiftUI struct ContentView: View { @State private var columnVisibility: NavigationSplitViewVisibility = .all private var cvString: String { "\(columnVisibility)"} var body: some View {

Comments

Sign in or sign up to comment and upvote.

No comments yet.