문제

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