In the following code, you can configure the button to switch setUserTrackingMode in the navigation bar.
// set MKUserTrackingBarButton // source: http://stackoverflow.com/questions/9876157/is-the-current-location-compass- heading-button-available-in-the-ios-sdk MKUserTrackingBarButtonItem *buttonItem = [[MKUserTrackingBarButtonItem alloc] initWithMapView:self.mapView]; self.navigationItem.rightBarButtonItem = buttonItem; // set tracking mode [self.mapView setShowsUserLocation:YES]; [self.mapView setUserTrackingMode:MKUserTrackingModeFollowWithHeading animated:YES];
How to do this (bottom left button in the map) Does Apple do this on Maps? (Sorry, I cannot post an image explaining it)
Heavy source share