Binding the Table View’s Content to the Array Controller

In Chapter 7, you implemented a data source for the table view. The table view asked the data source for the number of rows, then for the data for each cell. As we mentioned earlier in this chapter, none of that code is necessary with bindings and array controllers. When a table view has its Content binding set, it does not ask the data source for cell data.

Select the table view. Remember, selecting the table view can be tricky; it is easy to select the scroll view or clip view that contains the table view rather than the table view itself. Use the document outline or the jump bar to make sure you have selected the table view and not one of its superviews.

With the table view ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide 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.