title: iOS: How to Implement a "Shake Device" event?
body: <p>I want to a "Shake Device" event to my app - i.e., when the user shakes the device something happens.
  I tried implementing:</p>
  
  <pre><code>-(void) motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
      if (event.subtype == UIEventSubtypeMotionShake) {
          //something happens
      }
  }
  </code></pre>
  
  <p>It doesn't seem to work.......<br>
  Does anyone knows which method I should use?</p>