Reputation: 2901
My class is set as the delegate of the location manager, and the log in this code does print.
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager {
NSLog(@"will NOT display calibration");
[manager performSelector:@selector(dismissHeadingCalibrationDisplay) withObject:nil afterDelay:.25]; //This should never get displayed but does for some reason
return NO;
}
Nonetheless, the calibration bezel ALWAYS shows over the app. What's more annoying than the fact that it ignores my request not to display is that ever since 5.1 the calibration seems to be extremely sensitive: anytime the phone is near a radio, a computer, or otherwise not in an open field it comes up - roughly every single time I run the app.
This will drive my users bonkers, tho the point I'm considering removing heading from my app.
Anyone know how to actually turn off calibration? This is not a wilderness survival tool.
Upvotes: 2
Views: 1346
Reputation: 33
cannot comment to SG1 answer, si I'll do it in here:
so then, how are you supposed to manage the calibration screen if you cannot access location manager variable in MKMapKit? I know other apps do it... that should not be that difficult!
Upvotes: 0
Reputation: 543
The solution for MKMapView is to call this:
_mapView.userTrackingMode = MKUserTrackingModeNone;
just before you release _mapView.
This will make the calibration message disappear when you navigate to different pages.
Upvotes: 0
Reputation: 2901
I believe I know what is causing this. If you use a MKMapView, and that uses the tracking mode with heading, then the mapview has its own location manager and that location manager is auto-set to ask for heading calibration. What a nightmare, as the location manager is a hidden variable with no access to it.
Upvotes: 4