I'd like to get the row value in real-time as the iPhone user spins a wheel in a UIPickerView (not just when the wheel settles onto a particular row). I looked into subclassing UIPickerView then overriding the mouseDown method, but I couldn't get this to work. Any suggestions would be very much appreciated.
Perhaps try implementing the delegate method:
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
You could treat it as a passthrough (just passing back the reusingView parameter) but each time it was called you would know that view was coming on the screen as the user scrolled - then you could calculate how many views offset from this one the center view was.
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