I find the solution ! 😇
I will honest, it is quit dirty but it is working !
Picker("Street desc.", selection: $patient.indexStreet) {
ForEach (0 ..< NewPatient.typeStrt.count) {
Text(NewPatient.typeStrt[$0])
}
}
.pickerStyle(SegmentedPickerStyle())
.onAppear(perform: {
self.patient.typeStreet = NewPatient.typeStrt[self.patient.indexStreet]
})
Regards and thank you for your help.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: