Reputation: 6976
This is a question about good UI design for an iPhone app. It feels like a really easy / obvious question but I'm really struggling to find good examples of this done elsewhere so I'll go ahead and ask:
I have a settings page where I want the user to be able to enter how many rows of data to display in the main app. So it's essentially a numeric field, possibly also with a "No limit" option as well. Often I've seen this solved with a list of predetermined options (1, 2, 5, 10, No Limit) but I would prefer to allow the user to enter any number they like. I would use just a plain numeric text field but the built in numeric keypad on iOS has no 'Done' button which seems to overcomplicate things with that approach.
What's a good control / UI approach to use? Feel free to submit an example from another app.
Upvotes: 0
Views: 443
Reputation: 7148
I'd still use a UITextField
with the UIKeyboardTypeNumberPad
keyboard type. Generally speaking, I don't think the lack of a done button is a huge deal -- you can dismiss the keyboard by responding to touches outside the keyboard's frame or with a UIBarButtonItem
(this is pretty common when the UITextField
is part of a UITableViewCell
, for example, editing a phone number in the Contacts app). If you absolutely need a done button, you can always add your own.
Upvotes: 1
Reputation: 47241
I think a slider would do: first position could be No limit. A connected label could show the value. However, yes a slider has finite values, but there should be a reasonable limit. It's easy to use, no hitting keyboard buttons.
Upvotes: 3