Custom time picker

2015-12-02 Thread Eric Dolecki
I need to create a time picker control but don't have much vertical room. So buttons above and below to affect hours, min, am/pm are out. I was thinking swipes up and down. Best to use 3 UIScrollviews? Inertia is there. Only thing is how to get the numbers to "stick" in selection position while

Re: Custom time picker

2015-12-02 Thread Peter Tomaselli
One of the WWDC videos from back when collection views were introduced tackles a similar situation (a “flickable” cover-flow-ish collection view layout that centers at the end). Sorry that I can't be more specific about which video. > On Dec 2, 2015, at 7:22 PM, Eric Dolecki

Re: Custom time picker

2015-12-02 Thread Jonathan Hull
Here are the relevant methods from a UICollectionViewLayout subclass. You can just subclass the standard flow layout and add this or you can make a more custom layout if desired. For context, this collectionView has a vertical strip of digits (multiple strips make an odometer… like the

Re: Custom time picker

2015-12-02 Thread Jon Hull
Hi Eric, When creating similar controls in the past (I am actually making an odometer style view right now), I have found that collection views work really well. There is a delegate call (something like proposedOffset:forTargetOffset:) which gives you the sticky behavior you desire... Thanks,