S.J
S.J

Reputation: 3071

Need assistance regarding CLLocationManager Heading

- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations;

I want to access heading which this method's manager.heading.trueHeading is providing.

But mostly I found this

- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading

for heading updates.

Are both solutions ok to use?

and how can I convert heading to string for sending to web service?

Upvotes: 0

Views: 88

Answers (1)

Antonio MG
Antonio MG

Reputation: 20410

It depends on what you want and when you want it, both solutions seems ok but didUpdateLocations will be called only if the location has changed, and didUpdateHeading will be called only when the heading has changed.

If the heading changes but not the location, only didUpdateHeading will be called, and viceversa.

Upvotes: 1

Related Questions