Grouped-Style UITableViews

Thus far, our table cells have filled the entire width of the screen, with row after row of black-on-white Helvetica. There’s actually another table style, one where the rows don’t fill the view’s frame. If you check Settingsapp, you’ll see what I mean.

This is UITableViewStyleGrouped, in contrast to our previous UITableViewStylePlain. Grouped table views lose the sticky headers in favor of rounded containers to denote each section. Section indexes will technically work with grouped tables, but they don’t look very pleasant, so refrain from using the grouped style with very large data sets.

But wait, we haven’t seen anything about table view styles, so you may be wondering where they come into play. We cheated ...

Get RubyMotion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.