How to Add the Custom View Controller for the Map Controller in Your iOS App - dummies

How to Add the Custom View Controller for the Map Controller in Your iOS App

By Neal Goldstein, Dave Wilson

When an iOS app is aware of location, your movements can control the app. You can see this in the Reminders app that’s built into OS X and iOS. You can enter a reminder for a date and time, but you can also enter a reminder for a place. To add the MapController to your iOS app 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→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 DetailViewController 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.