Master-Detail Communication
In Chapter 14, we discussed different options for allowing view controllers to send messages to each other. Using instance variables is the simplest option, and that’s what we’ve done in Nerdfeed – we gave the ListViewController a pointer to the WebViewController. In this simple application, this approach works fine. Now let’s make Nerdfeed a little more complex and write a delegate protocol instead.
Right now, the detail view controller displays the WebViewController when a row in the master view controller is selected. In a moment, you’re going to create another view controller called ChannelViewController that will display metadata about the RSS feed. You will also create an Info button on the ListViewController ...
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