The "best" way to implement a UISegmentedControl under a UINavigationBar

I am working on an application that uses a navigation controller to manage views. In one part of my application, I want to have a UIView with a UISegmentedControl right below the navigation that β€œfilters” the UITableView. Essentially:

======================================== | < Back) Title Goes Here | <- navigation bar ======================================== | ( All | Active | Inactive ) | <- segmented control ======================================== | Item one > | <- UITableView all the way down |--------------------------------------| | Item two > | |--------------------------------------| | Item three > | |--------------------------------------| | Item four > | |--------------------------------------| | Item five > | |--------------------------------------| | Item six > | ======================================== 

So how do I put this together; how can i do this in code or how do i do this in IB?

Thanks!

+4
source share
2 answers

This seems pretty close to the Scope UISearchBar line. Did you think you were using this?

+1
source

A UITableView must have 2 sections, a segmented control in the first section, and elements in section 2.

0
source

All Articles