I’m using UIPickerView to let the user pick from few options, when I show the picker I scroll to the last selected row.
When user select a row I want to always dismiss the picker (even if user tap the already selected row), I dismiss the picker in the didSelectRow method.
The problem is, if the user reselect the selected row the didSelectRow method doesn’t get called so I can’t dismiss the picker..
One solution would be to create a subclass of UIPickerView and override the
touchesEnded:withEvent:method:Or you could add a
UITapGestureRecognizerto theUIPickerView:And then:
I’m not 100% sure though this won’t interfere with the way
UIPickerViewhandles taps.