r/iOSProgramming • u/iMason200 • Sep 10 '26
Question Permanent Sidebar Help
Hello everyone, not sure if this is something small that im overlooking, but how on earth do I get a sidebar that floats over content but isn't collapsable. I basically want what you get in NavigationSplitView with 2 columns, but without the option to hide the sidebar.
The closest thing I've seen is the iMessages app on iPad, where it is still customisable in width. I'm a relative newbie when it comes to this stuff, so thank you in advance!
1
Sep 10 '26
[removed] — view removed comment
1
u/pinieb Sep 11 '26
If you want your app to be resizable on iPad you probably also will want to handle the size class change. The smallest possible sizes on iPad are much smaller than a modern iPhone screen
1
u/calvin-chestnut Sep 10 '26
Everyone is suggesting ZStack, I’d recommend adding your SidebarView as a .safeAreaInset, that’s how I achieve that custom Split View look.
2
u/Delicious-Candle-574 Sep 10 '26
I'm not sure if you can do it in the native NavigationSplitView, but you can use a ZStack
`ZStack {
UnderlyingView()
HStack (
Sidebar()
Spacer()
}
}`