MKMapViewDelegate mapView:didUpdateUserLocation: method is not called when running on the 5.0 simulator, even if all location permissions are given in the device settings.
With 4.3 it's working fine.
Any ideas?
MKMapViewDelegate mapView:didUpdateUserLocation: method is not called when running on the 5.0 simulator, even if all location permissions are given in the device settings.
With 4.3 it's working fine.
Any ideas?
On
Check "setUserTrackingMode:animated:" and "userTrackingMode". Both are new in the iOS5. I had a similar problem and fixed it by setting MKUserTrackingModeFollow in the setUserTrackingMode function. I think the default tracking mode is MKUserTrackingModeNone and only calls mapView:didUpdateUserLocation once.
If your problem is that the mapView:didUpdateUserLocation is never called, then take a look at the options in the new xcode, right below the console outputs there's an icon like the gps icon in the ipad, which lets you simulate a location.
On
I know it's an old thread. I'll answer anyway, it might help others too.
I had similar problem with iOS 6. Which I was able to solve by setting the mapview delegate to self.
Like this:
[mapView setDelegate:self];
Make sure your ViewController.h has the MKMapViewDelegate along the lines:
@interface ViewController : UIViewController <CLLocationManagerDelegate, MKMapViewDelegate>
I got the same thing after refactor to ARC.
First I had the following code in viewDidLoad;
I did the following in de headerfile
And
The code I change in viewDidLoad