motionBegan - how does this work?

Discussion in 'iOS Programming' started by CaptSaltyJack, Jun 30, 2009.

  1. CaptSaltyJack macrumors 6502

    Joined:
    Jun 28, 2007
    #1
    I have a UIViewController with this method:

    Code:
    - (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?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Yeah, apparently you need to make the viewController firstResponder. (Seems like a bug to me.) Anyways, search the Apple Developer Forums for more info.
     

Share This Page