June 2011
Intermediate to advanced
590 pages
19h 31m
English
When Whereami launches, we want it to find the current location and display it on a map. In the last chapter, you worked directly with Core Location to find the user’s location. Now this won’t be necessary because an instance of MKMapView knows how to use Core Location to find the user’s location. All you have to do is set the showsUserLocation property of an MKMapView to YES, and it will show the user’s location on the map.
At the end of application:didFinishLaunchingWithOptions:, replace the message that tells the locationManager to update its location with one that tells the MKMapView to show the current location.
- (BOOL)application:(UIApplication *)application ...
Read now
Unlock full access