enter image description here

I want to make compass like native compass app has with such calibration view.
This method tell you that need to calibrate your hardware - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager
But how to get notification that calibration complete?

有帮助吗?

解决方案

You can monitor the headingAccuracy of subsequent location updates to see if your accuracy did increase. This is what Apple has to say:

The alert remains visible until calibration is complete or until you explicitly dismiss it by calling the dismissHeadingCalibrationDisplay method. In the latter case, you can use this method to set up a timer and dismiss the interface after a specified amount of time has elapsed.

So setting up a timer and dismissing it if accurac increased should work for you?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top