Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PizzaTray

macrumors newbie
Original poster
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.
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.