Search code examples
iosobjective-cios5ios6

How do you wrap multiple UIViews in a rounded rectangle for sorting (picture attached)?


In the following picture, how do you have Multi-option picker and the horizontal scroller in the same white rounded rectangle? It looks great for sorting, and I'd love to implement something like that.

enter image description here


Solution

  • You need to have a UITableView with two sections (one named "section 1" and one named "section 2").

    Each section has a single row, and each row's "cell" contains an option picker inside it's "Accessory View".

    http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/TableViewCells/TableViewCells.html

    That option picker is not part of the system's library of controls, I don't know where it came from.