IOS 6 map doesn't scale with MKUserTrackingModeFollow

While my iOS6 MKMapView is in MKUserTrackingModeFollowWithHeading or MKUserTrackingModeFollow , zoom gestures (pinch, double tap, two finger click) work sometimes, but not always.

The problem occurs when didUpdateUserLocation: is called after regionWillChangeAnimated and before regionDidChangeAnimated .

Any ideas on how to fix this?

To isolate the problems, I created a Single View application with MKMapView and UIToolbar (configured in .xib), to which I add MKUserTrackingBarButtonItem . UIViewController acts like <MKMapViewDelegate> . Here's the full implementation code:

 #import "ViewController.h" @implementation ViewController @synthesize mapView, toolbar; - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [self.mapView setDelegate:self]; MKUserTrackingBarButtonItem *trackButton = [[MKUserTrackingBarButtonItem alloc] initWithMapView:self.mapView]; [toolbar setItems:[NSArray arrayWithObjects:trackButton, nil] animated:YES]; } #pragma mark - MKMapViewDelegate - (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated { NSLog(@"regionWillChange >>"); } - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { NSLog(@"<< regionDidChange"); } - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { NSLog(@"-- didUpdateUserLocation --"); } - (void)mapView:(MKMapView *)mapView didChangeUserTrackingMode:(MKUserTrackingMode)mode animated:(BOOL)animated { // required for <MKMapViewDelegate> } #pragma mark - etc - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } @end 
+4
source share

All Articles