how do i show an entirely different screen when the connection tab is tapped on my tab bar/tab view?
//
// ContentView.swift
// tabBarPractice
//
// Created by Kev on 7/28/25.
//
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack{
Color.cyan
VStack{
TabView{
Tab("home", systemImage: "house"){
}
Tab("connection", systemImage: "wifi"){
}
}
}
}
}
}
#Preview {
ContentView()
}
struct connectionView: View{
var body: some View{
ZStack{
Color.black
VStack{
Text("Wifi is up")
}
}
}
}
Selecting any option will automatically load the page