On iOS 17.4 placing the .toolbar(.visible, for: .bottomBar) on the view which has the toolbar with the toolbar items placed as .bottomBar solved this issue where back swipe brakes navigation and also the issue with toolbar dissapearing after swipe back.
Here is pseudocode of my views with which I had both the broken navigation and dissapearing bottom toolbar issues:
NavigationSplitView {
SidebarView
.toolbar(.visible, for: .bottomBar) // <- solves all issues
.toolbar { // with this toolbar I had broken navigation as described in the original question
ToolbarItem(placement: .bottomBar) { ... }
}
} detail: {
DetailView
.toolbar { // with this one I had an issue with this toolbar as so as the sidebar's toolbar dissapearing after trying to swipe left
ToolbarItem(placement: .bottomBar) { ... }
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: