I am trying to write a test for UIPickerView to pick certain values. I use picker.adjust(toPickerWheelValue: pickValue) to do so. But the problem is that for some reason this only swipes picker by one value.
For example on the gif you can see that initial value was 52, then I called picker.adjust(toPickerWheelValue: "15") and it became 51 instead of 15, then I called it again and it became 50:

So the pattern is that it only changes it by one value up or down closer to the desired value.
What is the problem here?
Referencing with initial value works for me. So my code looks like this:
app.pickerWheels["52"].adjust(toPickerWheelValue: "15")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With