Im trying to make a Segment Control that handles Lists and/or Vstacks
I was able to make a Segment Control with text, but not Lists
import SwiftUI
struct MaterialSegmentControl : View {
@State private var MaterialType = 0
var body: some View {
NavigationView {
VStack {
SegmentedControl(selection: $MaterialType) {
Text("Style").tag(0)
Text("Text").tag(1)
Text("Arrange").tag(2)
}
Text("Value: \(MaterialType)")
}
}
}
}
How can I have a Segment Control that switched between Lists and/or Vstacks?