开发者

is <CLLocationManagerDelegate> necessary to get the users location?

开发者 https://www.devze.com 2023-01-04 01:39 出处:网络
the file that I need the users information in already has a -flipsideViewControllerDelegate-, so Is there a way that I can get t开发者_高级运维he users location coordinates without using the CLLocatio

the file that I need the users information in already has a -flipsideViewControllerDelegate-, so Is there a way that I can get t开发者_高级运维he users location coordinates without using the CLLocationManagerDelegate thing?


You could use -[CLLocationManager location] to get the most recently returned location, but I'd imagine that you'd still have to have the location manager updating the location.

However, by using the location property, you're switching from an interrupt-driven mechanism (an asynchronous callback) to a polling mechanism. The former is almost always much more efficient for getting continuous updates.


for iOS 4.x, location can be found using , MKMapView delegates as well.

0

精彩评论

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