iOS application summary: (1) Single full-screen showing card from array of cards (2) 2 buttons: Next and Prior -- to advance forward and backward through array of cards (3) Picker control that allows for new set of cards where different picker selection options trigger differ subsets of full card array. .pickerStyle(.menu) is being used
Voice Control works fine when app starts -- "Tap Next" and "Tap Prior" move the displayed card from the array forward and backward
Problem when new picker selection is made with .pickerStyle(.menu): (1) First card from new array shows correctly (2) Voice Control (e.g. "Tap Next") does not function until screen is physically touched (does not matter where screen is touched) (3) Voice Control works just fine when .pickerStyle is changed from .menu to either .inline or .wheel
Picker code:
Picker("Cards", selection: $selectedCards) {
Text("All Cards").tag(Strings.all)
Text("2345 Cards").tag(Cards.twoThruFive)
Text("1st Cards").tag(Cards.one)
Text("2nd Cards").tag(Cards.two)
Text("3rd Cards").tag(Cards.three)
Text("4th Cards").tag(Cards.four)
Text("5th Cards").tag(Cards.five)
Text("6th Cards").tag(Cards.six)
}
.pickerStyle(.menu)
.onChange(of: selectedCards) { tag in
switch tag {
case .all: cardsViewModel.newAllStrings()
case .twoThruFive: cardsViewModel.new2345Cards()
case .one: cardsViewModel.newOneCards()
case .two: cardsViewModel.newTwoCards()
case .three: cardsViewModel.newThreeCards()
case .four: cardsViewModel.newFourCards()
case .five: cardsViewModel.newFiveCards()
case .six: cardsViewModel.newSixCards()
}
}