Reputation: 2826
I designed a custom UIPicker for my iOS app and now i don't know how to implement it. I am new to iOS and i thought the Picker would be customizable but i think i was wrong.
Here is an image of it:
It's very minimalistic and simple so i think there has to be a way to implement it somehow? It would have 2 components and should behave as a usual UIPicker.
As far as i have seen the UIPicker class is only customizable to a certain degree, like changing the font size but not nearly as much as i would need it.
Upvotes: 1
Views: 366
Reputation: 82247
If your set of values is fairly small you could use two vertical UIScrollViews side-by-side, with a tall content area containing all your values.
Set the scrollviews to to 'paged' mode (where the page size is the height of one of your digits) - so the scrolling stops at each digit.
I think that'd work fine. If you have a huge number of possible values it'd take a lot of memory, but for a few it'd work.
EDIT: Looks like this control http://www.cocoacontrols.com/platforms/ios/controls/slnumberpickerview could be a useful starting point for customisation. Haven't tried it myself.
Upvotes: 1