I'm still just feeling out SwiftUI, so maybe someone can tell me if I'm missing something obvious.
My Pickers on Apple Watch always seem to crash my app when scrolling all the way up to the first option, then attempting to scroll down even a frame. The console output seems familiar from pre-SwiftUI:
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan].
I've reduced this to the simplest SwiftUI Picker I can imagine, and it still crashes.
struct TestPicker: View {
@State var test: Int = 1
var body: some View {
Picker("Pick!", selection: $test) {
ForEach(1...3, id: \.self) { value in
Text(String(value))
}
}
}
}