How to navigate from a TabView to another view that covers the TabView.
Notice it is covering the TabView here:
Note: The animation modifier could exist right below the transition modifier. Creating a VStack and adding it there just allows you to preview it.
struct MainView: View {
@EnvironmentObject var navigationOO: NavigationOO
var body: some View {
VStack {
if navigationOO.navigateToFullScreenView {
FullScreenView()
.transition(.move(edge: .trailing))
} else {
TabViewScreen()
}
}
.animation(.default)
}
}
See this video for reference regarding conditional navigation like this and using transitions.