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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.