Hi everyone,
I'm using the same code to every app i've made to make some action after "Shake" motion. From some reason that i can't find out, in my new app its not working.
What are the situations that shake motion not responding?
I'm using the same code to every app i've made to make some action after "Shake" motion. From some reason that i can't find out, in my new app its not working.
Code:
- (BOOL)canBecomeFirstResponder {
return YES;
}
- (void)viewDidAppear:(BOOL)animated {
// [super viewDidAppear:animated];
[self becomeFirstResponder];
}
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.type == UIEventSubtypeMotionShake) {
//Do somthing..
}
}
What are the situations that shake motion not responding?