I'm using Xcode 11 beta 5 and what I had it doesn't work anymore. This is my code:
struct ModeView : View {
@EnvironmentObject var state: IntentionState
var body: some View {
Picker(selection: $state.selection, label: Text("")) {
ForEach(state.modes.identified(by: \.self)) { mode in
Text(mode)
}
}.pickerStyle(SegmentedPickerStyle())
}
}
The error is in the line ForEach(uistate.modes.identified(by: \.self)) { mode in and it says:
Value of type '[String]' has no member 'identified'
When I was using Xcode 11 beta 4 it worked perfectly. The question now is how to use ForEach with an array string in Xcode beta 5
