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.
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.
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.