Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You would like to use Interface Builder to create a map control.
Use Interface Builder to add a map view to one of your application’s objects (usually a view). By adding it to an XIB file, you create an MKMapView object that can be accessed by your program.
Choose an XIB file to host the map. Normally, we use a View XIB file, which comes with a view attached to the XIB file by default. If you already have an XIB file, skip to step 2. To create a new XIB file, in Xcode choose File→New File. In the New File dialog, on the left side, choose User Interface and then, based on your need, select whichever type of XIB file you would like.
Once Interface Builder has opened the XIB file, select Tools→Library to open the Library pane.
In the Library pane, find the map view and drag and drop it into your XIB file.
Now that you have an instance of the MKMapView object in your XIB file (as shown in this recipe’s Solution), you can navigate to the Connections Inspector pane in Interface Builder by selecting Tools→Connections Inspector. Select your map object and you will see that the Connections Inspector allows you to see the delegate and the new referencing outlet connections of your map view. You need to drop the new referencing outlet to an IBOutlet of type MKMapView in your header files and drop the delegate connection to an object in your XIB file that implements the MKMapViewDelegate protocol.