11

In Android, to make a selection from a list of predefined options, we'd use the Spinner element seen below. What is the best approach to replicating this on iOS?

The iOS SDK offers pickers, segmented controls, modals, action sheets etc., but since my daily device is an Android I'm not sure what iOS users prefer in this scenario.

Android Spinner

  • Sometimes a segmented control is used, but I would limit that to 4 or less choices. It's especially good for things like gender, where there are only 2 choices. – Justin Jun 27 '14 at 16:44
  • 1
    No idea why you call this a “spinner”. I see a dropdown list. – kinokijuf Jun 28 '14 at 21:07
  • @kinokijuf In the Android API this is called a Spinner. – Lawrence Kesteloot Aug 21 '14 at 18:56
  • @LawrenceKesteloot Is it my fault that Google invents its own terminology for something that already has a name? – kinokijuf Aug 21 '14 at 20:42
  • 1
    I wasn't blaming you. You said you had "no idea" why he called it a spinner, so I explained. – Lawrence Kesteloot Aug 22 '14 at 1:32
10

In iOS, they use a "Picker"

iOS Picker

Check out the documentation.

Edit: In context you have a couple options. On iPhone, if the selection is part of a table view, then the picker can appear in the list like so:


(source: ios-blog.co.uk)

If the selection item is standalone, then the picker should appear at the bottom of the screen, similar to the keyboard.

(stolen from Lawrence's answer)

Lastly, on iPad, the picker can be a popover

  • 2
    Thanks, I think my question could've been written better. UIPickerView is what I'm currently using but I just wonder how users are accustomed to seeing this. In a modal popover? in an action sheet? or something else? Just the picker by itself didn't seem right because it consumes so much vertical space on my screen. – es0329 Jun 27 '14 at 15:40
  • 5
    I'm mildly amused that in an Android "spinner," you pick from a list, but in an iOS "picker," the list spins. – Alexis King Jun 28 '14 at 1:52
  • For the last option, why do you say "on iPad"? Is there no way to force that onto the iPhone? I desperately need it because I can't have a giant spinner taking up my screen real estate. – clocksmith Aug 11 '14 at 2:41
  • It's possible to do a popover on iPhone, however generally you won't have the screen real estate to make a popover worth while. It will look better as a full width picker. – Adam Thompson Aug 11 '14 at 13:50
2

The ActionSheetPicker-3.0 framework seems to do this pretty well.

gif Date chooser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.