Ios 如何在iPhone稍微滚动时停止CLLocationManager标题值的更改。

Ios 如何在iPhone稍微滚动时停止CLLocationManager标题值的更改。,ios,core-location,Ios,Core Location,我的位置经理工作得很好。当标题值更改时,可以注意到我 然而,我发现当iPhone滚动时,即使角度很小,标题值也是不同的 我已经定好了 locationManager.headingOrientation = CLDeviceOrientation.landscapeRight 我还设置了其他属性: locationManager.requestWhenInUseAuthorization() orientation = getCLDeviceOrientation(b

我的位置经理工作得很好。当标题值更改时,可以注意到我

然而,我发现当iPhone滚动时,即使角度很小,标题值也是不同的

我已经定好了

    locationManager.headingOrientation =  CLDeviceOrientation.landscapeRight
我还设置了其他属性:

    locationManager.requestWhenInUseAuthorization()
    orientation = getCLDeviceOrientation(by: UIDevice.current.orientation)
    locationManager.desiredAccuracy = kCLLocationAccuracyBest
    locationManager.headingFilter = 0.1
    locationManager.headingOrientation = CLDeviceOrientation.landscapeRight
    locationManager.startUpdatingHeading()
    locationManager.delegate = self

您正在设置的
headingOrientation
属性仅在不需要默认值时用作参考点:纵向模式下的设备顶部表示正北(0度) 设置了参照后,您将获得每一次的度数变化

您可以在此处看到文档: