No problem in displaying the Text, but how can I read the tag# with the print statement or the good old NSLog. format.
In the old way, I had no problem in capturing the tag # Thank you ahead of time for a reply.
struct SegmentedDirectorsCut: View {
var symbolsURL = ["Yes", "No"]
@State private var directorCut = 1
var body: some View {
VStack {
HStack {
Picker(selection: $directorCut, label: Text("Picker")) {
ForEach(0 ..< symbolsURL.count) {
Text(self.symbolsURL[$0]).tag($0)
}
}
.pickerStyle(SegmentedPickerStyle())
.padding(.all)
}
Text("Director Selected: \(symbolsURL[directorCut])")
}
}
}
#if DEBUG
struct SegmentedDirectorsCut_Previews: PreviewProvider {
static var previews: some View {
SegmentedDirectorsCut()
}
}
#endif