views:

177

answers:

1

I want my UIPickerView to rotate to the beginning of the list when it is scrolled past the bottom. How do I do this? Basically, I want the functionality of the UIDatePicker when it scrolls the hours/minutes/seconds continuously.

I'm assuming I could just return an extremely large number from the numberOfComponentsInPickerView and then the actual titleForRow with a modulus of the number, but I think there must be a better way. Plus, I'm not sure how it is handled when the wheel starts since I can't return a negative number and it doesn't normally scroll backwards.

Any thoughts on how to do this?

+1  A: 

Maybe this idea would work - just keep the user in the middle of the wheel so it has the sensation of staying on the same wheel.

spig
A comment from the article mentions overlaying a UIView with animation: "They're overlaying the picker wheels with animation frames, giving the illusion of fast spinning."
bentford
Yeah - I used the exact same ideas as them and I was able to get a simulated continuous wheel. Clever idea of theirs. I didn't need to simlulate fast spinning but that's also very clever.
spig