Automating pickerWheels in VisionOS

Hi! I am learning Swift and UIKit for work. I am trying to automate using a pickerWheel in VisionOS, but since .adjust(toValue: <someValue>) was removed in VisionOS's API, I am absolutely struggling to find a way to set a pickerWheel to a specific value.

Currently, my solution is to calculate the amount of times I would need to increment/decrement the wheel to get from the current value to the desired value, then do so one at a time. However, this currently does not work, as .accessibilityIncrement() and .accessibilityDecrement() do not work, and .swipeUp() and .swipeDown() go too far. What can I do?

Note: I am not a frontend engineer, so while solutions may exist that involve changes to the frontend, I would much rather try and get the frontend we do have to work as is.

What specific API are you using for the picker? Are you referring to UIDatePicker, UIColorWell or are you using a custom subclass of UIPickerView ?

Automating pickerWheels in VisionOS
 
 
Q