开发者

How does CLLocationManager distanceFilter work? Don't you need an update to know where the phone is?

I am wondering how CLLocationManager's distanceFilter work. According to the docs,

 The minimum distance (measured in meters) a device must move laterally before an update event is generated.

So has the phone already gathered the location, but distanceFilter just prevents my call back from getting notified?

I don't see how using the distanceFilter saves battery life, it seems like 开发者_如何学Goa Catch-22.


I believe quantumpotato's comment is close. Through Apple's own testing, whatever, they've determined what power level they have to use on the antenna to get readings within a certain accuracy.

As someone who has used this API, I agree with you, it's not perfect and it is somewhat misleading. Think of those flags as "desired levels" and depending on the type of app you want to make, you just need to pick one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜