On watchOS, I'm trying to make a really simple form consisting of a Section, with a list of text values, which I can tap to perform some action. Code below.
struct ContentView: View {
var body: some View {
Form {
Section(header: Text("Section 1")) {
ForEach(0 ..< 3) { int in
Text("Hello \(int)")
.onTapGesture(count: 1) {
print("Tapped \(int)")
}
}
}
}
}
}
When I run this in the simulator, each cell tap only intermittently prints as desired. For any cell, sometimes a tap will emit a print, and sometimes nothing happens. (More often, nothing happens. Only on occasion does a print emit.)
Am I doing something wrong, or is this a bug in the Apple Watch simulator? Occurs in both the 40mm and 44mm simulators, as of Xcode 11 beta 5 on macOS Catalina beta 5.