0

I'm a noob at Obj-C, and especially at the concept of storyboarding. It seems like storyboarding could be so awesome yet it is not intuitive at all.

I'm trying to make it so when this button is pressed, the user will see a drop down menu letting them pick from either All, Read, or Unread:

enter image description here

Do I drag a new view controller out and put in a drop down selector in that and then segue to that view from the button?

P.S. What system icon should I use to represent the read/unread filter? The one I have just isn't right. =]

P.P.S. This project is open source: https://github.com/kirkouimet/enzyme

jscs
  • 63,694
  • 13
  • 151
  • 195
Kirk Ouimet
  • 27,280
  • 43
  • 127
  • 177

1 Answers1

1

Well, I guess the most native control for this would be a scope bar, but this must be attached to a search bar, which may not be what you're looking for. The scope bar basically would only appear when the search bar is the first responder (i.e., when it has the keyboard's focus).

If you're developing for iPad, you could use a popover controller. Simply create a view controller to manage the buttons for your filter and use a UIStoryboardPopoverSegue to transition to them.

These two questions involving popover segues may help: - iOS - Create an Popover View using StoryBoard - UIStoryboardPopoverSegue opening multiple windows on button touch

You may also want to consider using a segmented control inside a toolbar—using the UISegmentedControlStyleBar style—and situating that above the search bar you already have. Then you would just create a IBAction method (probably in your root master view controller) that responds to the UIControlEventValueChanged control event. You can use that to determine which segment was selected to do your filtering.

Something like this...

enter image description here

From top to bottom:

  • Navigation bar
  • Toolbar
    • Flexible space
    • Segmented control
    • Flexible space
  • Search bar
  • Table view
Community
  • 1
  • 1
CIFilter
  • 8,647
  • 4
  • 46
  • 66