Lasse V. Karlsen Lasse V. Karlsen - 11 months ago 84
iOS Question

UIPickerView, detect "rolling wheel" start and stop?

I just discovered that if I do the following:

  1. Click the button that animates a
    into my view

  2. Quickly start the wheel rolling towards, then past, the last item

  3. Dismiss the view with a button

Then it has not yet selected the last item yet.

I tried this by simply outputting to the console whenever the
method was fired, and it fires when the wheel stabilizes on the last item.

Can I detect that the wheel is still rolling, so that I can delay checking it for a selected value until it stabilizes?

If it matters, I'm programming in MonoTouch, but I can read Objective-C code well enough to reimplement it, if you have a code example that is.

Answer Source

I think you can just check if the UIPickerView is in the middle of animating and wait for it to stop. This was answered here link