public struct TeamBContentView : View {
@State private var selectedTab = 0
public init() {}
public var body: some View {
VStack {
// Use picker view and set picker style as segmented
Picker("Tabs", selection: $selectedTab) {
Text("Home").tag(0)
Text("About Us").tag(1)
Text("Contact Us").tag(2)
}
.pickerStyle(.segmented)
.padding()
Spacer()
// Then display the view based on the tab selected
switch selectedTab {
case 0:
Text("This is home screen")
case 1:
Text("This is about us screen")
case 2:
Text("This is contact[enter image description here][1] us screen")
default:
Text("This is home screen")
}
Spacer()
}
.navigationBarBackButtonHidden() // use this to hide the back button
}
}