开发者

Extra instance of CLLocationManager?

开发者 https://www.devze.com 2023-02-17 11:56 出处:网络
I am working on a project where I create 2 instances of CLLocationManager, my question is that when I look in instrument whilst my code is running is shows 3 instances, is this right, what is creating

I am working on a project where I create 2 instances of CLLocationManager, my question is that when I look in instrument whilst my code is running is shows 3 instances, is this right, what is creating the 3rd one, or is it just a system thing?

XCODE:

Extra instance of CLLocationManager?

开发者_如何学运维

INSTRUMENTS:

Extra instance of CLLocationManager?


I suspect the middle one is being created by your MKMapView (I assume you are using one). MKMapView has a location manager behind it, it's how it can carry out the showUserLocation feature. MKLocationManager is not a public class, and the map view won't expose it to you so there's not much you can really do about it.

0

精彩评论

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