Reputation: 1065
What's the besy way to allow a user to select a number on iOS? Basically I have a "form" that allows users to set up a game. One of the options requires them to specify the number of teams.
My first idea was to use a slider, but how would I lay this out? The following doesn't seem very intuitive:
Select number of teams: 5
C=====O=================D
But then again, this doesn't look very good either:
Select number of teams:
C========O==========D 5
My second idea was to create a button that when pressed, shows the user a modal view with a UIPickerview but then this seems a bit over the top just to select a number.
Thanks in advance.
Upvotes: 1
Views: 1410
Reputation: 2541
Well if you have only few choices to select from you might want to use a few buttons with one selected showing different color (and text would indicate value of selection).
Also alternative is to have two buttons +/- and text box which would increment and decrement number of teams.
And finally you can use one of the custom controls:
Upvotes: 1
Reputation: 10127
Both methods are fine. A slider works well, if you don't have a exhausting range of numbers to select from, since that could make the slider a little unprecise. I'd go for your second layout and put the number next to the slider and the label above.
However, a slider can only select one number - in your question title you are referring to "select a range of numbers". That is quite a difference. If you need a slider to select a range (like 3 to 5), a two-way slider custom component would be necessary.
Upvotes: 1