Passing Data Around

As we discussed in Chapter 10, it is often necessary for view controllers to pass data around. To show this off, you will make it so Colorboard has a list of favorite colors that can be edited by drilling down to the BNRColorViewController you just configured.

Instead of using static cells for the UITableView, you will go back to using dynamic prototypes. Because of this, you will have to implement the data source methods for the table view. Prototype cells allow you to configure the various cells you will want to return in the data source methods and assign a reuse identifier to each one.

In Colorboard.storyboard, delete the Red and Green view controllers that are being pushed from the UITableView. Then select ...

Get iOS Programming: 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.