16

My universal app has a settings page, wherein the user must choose a theme from a dozen available themes.

Problem is, if I am using a picker-view, it takes up most of the screen on an iPhone.

I think what I want is something like your standard Windows drop-down menu, where it just displays on a single line the current selection, and clicking it expands into a scrollable list of possible items. Selecting an item collapses the list back into the original form.

So my question is: What is my best method for handling this situation? Can anyone point me to pictures or code examples of how this situation is handled successfully?

EDIT: This is the behaviour I'm looking for:

  • only the currently selected profile is displayed
  • when the user taps on this, it expands into a list
  • when the user selects an item (or taps outside of the view) it collapses back to its original form, now displaying the new selection

ie functionally equivalent to a dropdown.

P i
  • 29,020
  • 36
  • 159
  • 267
  • 1
    http://blog.lemberg.co.uk/iphone-development/custom-dropdown-list/ – P i Jul 17 '11 at 11:05
  • 8
    No, you definitely don't want a custom control. Follow Apple's design. You use a picker-view, and it takes up most of the screen. The user doesn't need to do anything but set that particular option, then they're finished. They get their screen real estate back, and they didn't have some insurmountable learning curve for using your software. – Cody Gray - on strike Jul 17 '11 at 11:32
  • 1
    What do you mean by 'Get their real estate back'? The whole point of my question is that this control seems to be a fixed size ie it is going to fill up a big chunk of the screen whether or not the user wants to change the selection. ie you DON'T get real estate back, unless you launch it from a button. Is this what you are saying? – P i Jul 17 '11 at 12:50
  • PS Why the anonymous downvote!? If the question is poor, at least tell me why. – P i Jul 17 '11 at 12:52
  • 1
    Obviously you DON'T show the control unless the user wants to change the setting. I don't see why this is so hard for you to understand. I mentioned before that you should follow Apple's design. Explore the applications that they've written that are already on your iPad. They don't reinvent the standard controls, and you shouldn't either. The answer to your question of designing a completely separate interface for the iPad is that **no**, you definitely shouldn't do this. Always follow the standard platform conventions. It's *supposed* to take up a lot of screen space. It's a **touch screen**. – Cody Gray - on strike Jul 17 '11 at 12:55
  • I took that into consideration. As the comments were separated by only a few seconds, you would have received both of the comments together, and one of them was directed towards yourself. I used the wrong word -- /s/anonymous/unqualified. If it is not qualified, where is the benefit? Also, what you do with your time is your responsibility. – P i Jul 17 '11 at 13:39
  • 5
    @CodyGray: You complaining about complaining about downvotes wasting your time has wasted my time, so I'm replying to you to waste some of your time back. – Glenn Maynard Jul 24 '12 at 19:08
  • Picker-Views are so much 2007. – brainray Jan 18 '13 at 10:32

1 Answers1

10

Firstly, this question is a duplicate of:

(not much good) Picker view as subview

(same) How to make an iPhone dropdown-looking button

(better) How to create drop down list box for an iphone app

(even better) Creating a drop-down list in iPhone app

(that last one links to some handy code)

Secondly, Google image search for 'dropdown control iphone' restricting the image size to 320x480 shows how everyone is doing this.

Basically a picker view scrolls in from the bottom, the same way as the keyboard does.

enter image description here

Community
  • 1
  • 1
P i
  • 29,020
  • 36
  • 159
  • 267
  • Image not showing, I don't know why; URL is http://www.freeoniphone.com/images/tips/dropdown.jpg – P i Jul 17 '11 at 15:05