Open Cavidan998 opened 4 hours ago
In SwiftUI, you determine this behavior by putting the NavigationStack inside or outside of the TabView. This is the same behavior for using native NavigationStack or RouterView...
// Each tab has a NavigationStack and does not hide tabbar
TabView {
RouterView { router in
Text("Screen1")
}
}
// The entire tabbar has one NavigationStack that does hide tabbar
RouterView { router in
TabView {
Text("Screen1")
}
}
Thanks for quick response , i will check this
I think after IOS 18, this problem appeared. I tested your code, it does not work. But this case worked before IOS 18, did you test your code in any project
Problem is on showScreen(.push) it does not work correctly
Can you provide sample code example that does not work?
there are a lot of codes. I found problem, problem is when i put
RouterView { router in TabsView(viewModel: TabsViewModel()) }
problem occur.
But when i use
TabsView(viewModel: TabsViewModel())
it works.
I dont understand, why?
After 16 hours of testing all cases. i found how to solve.
RouterView(addNavigationView: false) { router in }
this solved problem.
Tabbar is only shown in first screen, i dont hide tabbar, but when push tabbar stay on old screen, does not cross to new screen. Anyone face that problem?