ios - iPhone : locationManagerShouldDisplayHeadingCalibration ignored/does nothing

标签 ios cocoa-touch core-location

我的类被设置为位置管理器的委托(delegate),并且此代码中的日志会打印。

- (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;
}

尽管如此,校准边框始终显示在应用程序上方。比它忽略我不显示的请求这一事实更烦人的是,自 5.1 以来,校准似乎极其敏感:只要手机靠近 radio 、计算机或其他不在开放区域的地方,它就会出现 - 大致每次我运行该应用程序时。

这会让我的用户疯狂,尽管我正在考虑从我的应用程序中删除标题。

有人知道如何真正关闭校准吗?这不是荒野生存工具。

最佳答案

我相信我知道是什么原因造成的。如果您使用 MKMapView,并且使用带航向的跟踪模式,则 map View 有自己的位置管理器,并且该位置管理器会自动设置为要求航向校准。真是一场噩梦,因为位置管理器是一个隐藏变量,无法访问它。

关于ios - iPhone : locationManagerShouldDisplayHeadingCalibration ignored/does nothing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9751970/

相关文章:

ios - jpg 文件在 chrome 中显示,但在 safari 中不显示

iphone - 没有调试器,Stdout重定向在iOS中不起作用

ios - Pickerview不显示

cocoa-touch - iOS CGAffineTransform 奇怪的行为

objective-c - 重新加载 UIView 的正确方法是什么?

ios - 从 "While using the app"到 "Always",反之亦然

iphone - 在 Xcode 4.2 中使用 GPX 路线或轨道进行测试

ios - 如何将结构参数与 OCMock 匹配?

ios - 库 Info.plist 内的 NSLocationWhenInUseUsageDescription

ios - 通用时间条目 View Controller 的 NSTimeInterval 与 NSDateComponents