PDA

View Full Version : motionBegan - how does this work?




CaptSaltyJack
Jun 30, 2009, 11:56 PM
I have a UIViewController with this method:


- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
NSLog(@"FUN");
}

Then I build and run, and invoke a shake gesture (using the iPhone Simulator menu) but nothing happens. Am I missing something?



dejo
Jul 1, 2009, 12:09 AM
Am I missing something?
Yeah, apparently you need to make the viewController firstResponder. (Seems like a bug to me.) Anyways, search the Apple Developer Forums for more info.