Take the 2-minute tour ×

Hi some body now how can I make this how detect if the device is moving right or left referenced to some point. Like Night Sky app I know to determinate the attitude of the device is with coreMotion but I don't find how can I detect that. i can detect roll pitch and yaw but this how can I do that?

share|improve this question
add comment

2 Answers

Use the [UIAccelerometer sharedAccelerometer] and set its delegate. Using the method


You can get the movements of the device. Look also at the references of UIAccelerometre and UIAcceleration. You can track the movement using the x, y and z properties of the UIAcceleration.

share|improve this answer
add comment

You'll need to use the accelerometer. Every iOS device has one. A trip to Google should get you an answer. If you were looking for code, sorry. I don't memorize that kind of stuff.

share|improve this answer
Accelerometer for this does not work because i need to move the ipad to right to left up and down not in only one point like 40cm to right etc. –  user1873220 Apr 2 '13 at 0:22
You can still use the accelerometer for this. Google Core Motion. –  Undo Apr 2 '13 at 4:00
Thanks Erway I looking for very much in Google but I dont finde how can i make this kind of stuff can you give some link or some info of that if you have thanks Erway. –  user1873220 Apr 3 '13 at 15:45
To clarify: you want to determine the attitude of the device? –  Undo Apr 3 '13 at 17:03
add comment

Your Answer


