Chapter    13

Static Tables

Many table views are built dynamically, populating instances of prototype cells on demand as the data is displayed. But that’s not the only way of building them; static table views can also be useful components of a user interface.

With a static table, you define the cells and their contents up front. This is useful in situations where you know the content to be displayed won’t change, such as when displaying a list of settings. Many parts of the built-in iOS Settings app are based on a static table view, as shown in Figure 13-1.

9781484212431_Fig13-01.jpg

Figure 13-1. A static table used to display the Display & Brightness controls in the Settings ...

Get Pro iOS Table Views and Collection Views: Using Swift 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.