Recipe: Working with Sections
Many iOS applications use sections as well as rows. Sections provide another level of structure to lists, grouping items together into logical units. The most commonly used section scheme is alphabetic, although you are certainly not limited to organizing your data this way. You can use any section scheme that makes sense for your application.
Figure 9-6 shows a table that uses sections to display grouped names. Each section presents a separate header (that is, “Crayon names starting with . . . ”), and an index on the right offers quick access to each of the sections. Notice that there are no sections listed for K, Q, X, and Z in the index because those sections are empty. You generally want to omit empty sections ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access