Display Map In iPhone

In this application we will see how to display Map in the iPhone. This is the very simple application. Just have a look.

Step 1: Create a View Base applicationusing template. Give the application name “MapDisplay”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the directory structure to check out the content of the directory.

Step 3: In the WebViewController.h file we have added UIWebView for displaying the web page. So make the following changes in the file.




Step 4: Double click your MapDisplayViewController.xib and open it to the Interface Builder. Open the view window drag WebView from the library and place it to the view window.Drag from the File’s Owner icon to the webView and select mapDisplay and connect File’s Owner icon to the View icon. Now save the MapDisplayViewController.xib file and go back to the Xcode.

Step 5: Make the following changes in the MapDisplayViewController.m file.




Step 6: Now compile and run the application.

You can downloaded SourceCode from here MapDisplay 2