r/iOSProgramming • u/thejeraldo • 2d ago
Question Side menu navigation
I am working on a 10+ year old app which has a home page with tab bar and a side menu to go to other pages. The side menu used is a custom view.
I wanted to ask how anyone has transitioned from custom side menus to standard native controls on iOS. I am looking at moving away from the custom menu and go with the controls provided by Apple. The closest I can think of is a navigation split view. Does anyone have experience using it? How is it for an app that supports iOS on regular and Duo and on iPad?
2
u/Dogukanko 2d ago
If you want an Apple-native pattern to try, a NavigationSplitView with a selection-backed sidebar is a good prototype. It collapses into a stack at compact widths and keeps the multi-column layout on iPad; I’d keep the tab bar only for true top-level destinations. Try a few real sections on each device size and check where Back and selection state land before replacing the custom menu.
1
u/Ok-Team-8426 2d ago
I recently moved a SwiftUI app to NavigationSplitView for regular iPhone, iPhone Duo, and iPad, and it's worked really well for me as a native replacement for a custom side menu, as long as your structure is list plus detail.
Two things that mattered on Duo: I used the .balanced style and kept preferredColumn. I had also set .navigationSplitViewColumnWidth(...), and that stopped the split from sitting on the fold. Once I removed the fixed widths, the system placed the separator on the crease and each column got its own leaf in book position.
One case worth testing is hiding the sidebar in book position, since the detail can stretch across both leaves. I keep both columns visible in that posture, and I avoid nesting another custom container inside the split. On a regular iPhone it stays a compact stack, so you still get a normal push from the list. Hope that helps!
1
u/mrdzyn 1d ago
If you can target iOS 18+, look at TabView with .tabViewStyle(.sidebarAdaptable) before going all in on NavigationSplitView. It gives you a normal tab bar on iPhone and lets it turn into a sidebar on iPad, and you can group the extra destinations from your old side menu into TabSections. NavigationSplitView is great on iPad, but on a compact iPhone it collapses into a plain stack, so it doesn't really replace a tab bar plus menu combo there. I'd sort your menu items into "top-level tab" vs "settings/secondary" first, since a lot of old hamburger menus turn out to be half settings screens.
1
u/dahiya_xa 1d ago
if you can target ios 18, a TabView with .tabViewStyle(.sidebarAdaptable) is worth a look. tabs on iphone, a real sidebar on ipad, and people can move items between them. NavigationSplitView is fine too but on iphone it just collapses into a stack, so the side menu feel goes away
1
u/Kitchen_Cable6192 1d ago
If you keep a custom drawer, I’d make it a transient overlay rather than another navigation container: one @State isOpen can drive both the offset and a drag gesture, with the NavigationStack kept outside the drawer so you do not end up maintaining two back stacks. For a native list/detail flow, NavigationSplitView is worth prototyping (it requires iOS 16+ and collapses to a stack on iPhone); reserve TabView for the destinations that really are top-level.
5
u/ThalesMother9938 2d ago
One more option to check before you commit to a split view: since iOS 18, TabView has a sidebar adaptable style. On iPad the tabs can turn into a sidebar, and on iPhone it stays a normal tab bar. Extra pages can go into tab sections, which show up in the sidebar. That could let you merge your tab bar and side menu into one native control.
For a 10+ year old app that is probably UIKit, UITabBarController got the same idea in iOS 18 with the tab sidebar mode, so you may not need a SwiftUI rewrite . I'd verify how it behaves on the Duo size though.
What minimum iOS version do you have to support?