Instance Method


Tells the receiver that a motion event has begun.


- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event;



An event-subtype constant indicating the kind of motion. A common motion is shaking, which is indicated by UIEventSubtypeMotionShake.


An object representing the event associated with the motion.


UIKit informs the responder only when a motion event starts and ends. It does not report intermediate shakes. Motion events are delivered initially to the first responder and are forwarded up the responder chain as appropriate.

The default implementation of this method forwards the message up the responder chain.

See Also

Responding to Motion Events

- motionEnded:withEvent:

Tells the receiver that a motion event has ended.

- motionCancelled:withEvent:

Tells the receiver that a motion event has been cancelled.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software