Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Disable collapsing Sidebar/NavigationSplitView

I want to keep the sidebar fixed in NavigationSplitView. I don’t want the user to be able to open or close the sidebar. I removed the toggle button, but I still couldn’t make the sidebar stay fixed. It can still be closed using Cmd + Alt + S or by dragging.

What I want is just to disable the resize feature of the sidebar. Isn’t it possible with SwiftUI?

NavigationSplitView is kind of blackhole :)

            LeftSidebarView()
                .environmentObject(detailView)
                .toolbar(removing: .sidebarToggle)
                .navigationSplitViewColumnWidth(240)

Don't use NavigationSplitView, use HSplitView.

Example: https://gist.github.com/hrvoje0099/97d6a2fd050d98afcdf140dcbed04f7b

Disable collapsing Sidebar/NavigationSplitView
 
 
Q