Setting Up the EventsController
In this section, you need to do the same thing as you do in Chapter 15 to create and connect the
EventsController object to the storyboard. As I explain in Chapter 15, the way you develop a storyboard is rather formulaic. I review it here (and for the last time):
1. Lay out the view controllers you need for the user experience architecture.
2. Add the custom view controller to your app.
3. Tie the two together in your storyboard.
4. Add the code you need to the custom view controller.
After you get into the routine of how to do it, your life as a developer becomes much easier.
You’ll also add another view controller to the storyboard (the aforementioned
EventPageController) that will be used by the
Adding the custom view controller
To add the
EventsController to the RoadTrip project, follow these steps:
1. In the Project navigator, select the View Controller Classes group and then either right-click the selection and choose New File from the menu that appears or choose File⇒New⇒New File from the main menu (or press +N).
Whatever method you choose, you’re greeted by the New File dialog.
2. In the left column of the dialog, select Cocoa Touch under the iOS heading, select the Objective-C class template in the top-right pane, and then click Next.
You’ll see a dialog that will enable you to choose the options for your file. ...