0

i want to implement next previous functionality using below function.

- (void)motionEnded:(UIEventSubtype)mt withEvent:(UIEvent *)event

But i dont know how to indicate in left or roght. Please give me advice.

Dhara
  • 4,093
  • 2
  • 36
  • 69
MD.
  • 1,131
  • 4
  • 18
  • 28

1 Answers1

1

There is no way using this method to determine whether the shake was to the left or the right, it just detects a general shaking motion. You will need to process the accelerometer output in detail to achieve what you want. Look into the UIAccelerometer class and this similar question.

Community
  • 1
  • 1
Nick Moore
  • 15,547
  • 6
  • 61
  • 83