Reputation: 615
I am working on a project, and part of it needs to measure the rotation of the device. I assume that the most efficient way to do this would be with the gyroscope, but please correct me if I am wrong. I really have no idea where to start, so any pointers would be greatly appreciated.
Upvotes: 1
Views: 1321
Reputation: 8707
Check out Core Motion framework available in iOS starting 4.0. It provides a lot of ready stuff to work gyro and accelerometer at high level without need to work will low level data.
Upvotes: 0
Reputation: 29975
You'd have to start by including the CoreMotion
framework. Then refer to the documentation for a good outline of the CMMotionManager
class.
The actual implementation is very easy - implement the delegate and tell the manager that you want to start receiving notifications.
Upvotes: 1