2

I'm new to IOS programming, I don't know how to judge the swinging direction of a device.And I have searched a long time for this question, but I only find very little about this. Could someone help me? Thanks very much!

Abel_CN
  • 64
  • 6

1 Answers1

0

Try this:

I have search some post for you, hope to help.

how to detect direction of shake in iphone

How to determine the direction of a iPhone shake

Community
  • 1
  • 1
fannheyward
  • 18,599
  • 12
  • 71
  • 109
  • I'm sorry, the meaning which I say is not this, I want to ask how to judge the directions(to up, to left, to right, to down) of shaking the ios device by users. Thanks for your answer! – Abel_CN Jun 18 '12 at 03:06
  • @Abel_CN My mistake, I found some post, hope to help. – fannheyward Jun 18 '12 at 03:14
  • In my project, I need to detect the directions of x and y, And I found that the acceleration of x and y both become big, which make me very tangle! – Abel_CN Jun 18 '12 at 03:26