Open onmyway133 opened 2 years ago
If we have a Picker inside a View that has DragGesture, chances are when we scroll the wheel, the DragGesture is detected too
To prevent this, we can attach a dummy DragGesture to our Picker
DragGesture
Picker
Picker("", selection: $number) { ForEach(FavoriteNumbers.allCases) { number in Text(number.name) } } .pickerStyle(WheelPickerStyle()) .gesture(DragGesture())
If we have a Picker inside a View that has DragGesture, chances are when we scroll the wheel, the DragGesture is detected too
To prevent this, we can attach a dummy
DragGesture
to ourPicker