Setting Up the Map Controller
In this section, you need to do the same things you do in Chapter 16 to create and connect the
MapController object to the storyboard. Here you go again!
Adding the custom view controller
To add the
MapController 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.
3. Enter MapController in the Class field, choose or enter RTDetail ViewController in the Subclass Of field, make sure that the Target for iPad check box is selected and that With XIB User Interface is deselected, and then click Next.
4. In the Save sheet that appears, click Create.
5. Delete the
You’ll use the default in the
Setting Up the MapController in the MainStoryboard
Now that you have a custom view controller, you need to tell the storyboard to load your custom view controller rather than a ...