Thomas Kekeisen
Thomas Kekeisen

Reputation: 4406

What is the difference between "UIAccelerometer" and "CLLocationManager"?

What is the difference between "UIAccelerometer" and "CLLocationManager"? Both give me x, y and z axis as result.

UIAccelerometer

CLLocationManager

Is this information from the same sensors with different formatting? Or are there "real" differences?

Thanks!

Upvotes: 0

Views: 379

Answers (1)

Marcelo Cantos
Marcelo Cantos

Reputation: 186098

UIAccelerometer tells you which way — and how hard — gravity is pulling (including acceleration due to motion, which, per Einstein's general theory of relativity, is indistinguishable from gravity).

CLLocationManager tells you where you are on the surface of the earth. It's the GPS API.

Upvotes: 4

Related Questions