I did not wrap my HomeView around a Tab, instead I used the .tabItem modifier. let me test and I'll get back to you.
EDIT: Just to be clear, my minimum deployment is 17.5. Seems like Tab is for 18+ https://developer.apple.com/documentation/swiftui/tab
For more context, here's some more of my code:
TabView(selection: $tabIdx){
SettingsView()
.tabItem {
Label("Settings", systemImage: "gearshape.fill")
}
.tag(0)
NavStackView {
HelloWorld()
}
.tabItem {
Label("Home", systemImage: "house.fill")
}
.tag(1)
CustomStoreView()
.tabItem {
Label("Shop", systemImage: "storefront.fill")
}
.tag(2)
}
struct NavStackView<Content: View>: View{
@Environment(NavManager.self) private var navManager
@ViewBuilder let root: Content
var body: some View {
@Bindable var nm = navManager
NavigationStack(path: $nm.pathStack){
root
.navigationDestination(for: NavPath.self) { np in
switch np.pathId {
case "home":
NavigationLazyView(HomeView())
...
Post
Replies
Boosts
Views
Activity
nvm I misread the docs