Update :
Something exist on iOS 16+ with SwiftUI : you can use the modifier .toolbar(.hidden, for: .tabBar).
Here's an example :
struct ContentView: View {
var body: some View {
TabView {
view1
.tabItem { Label("View 1", systemImage: "house") }
view2
.tabItem { Label("View 2", systemImage: "square.and.pencil") }
}
}
var view1: some View {
NavigationStack {
NavigationLink("Push") {
Text("View 2!")
.toolbar(.hidden, for: .tabBar)
}
}
}
var view2: some View {
NavigationStack {
Text("Another view")
}
}
}
It works, but it's not perfect :
the tab view disappear without any animation (with UIKit the tab view was going with the view who disappear)
wen you go back to the previous view, the tab view come back after the view appeared (who move all of your content to the top)
In video :