iOS engineer who likes clean, simple designs and sans-serif.


Shake Motion Event

This is one reason why I love Apple + Objective C. It’s super easy to implement a “shake” feature.
All you have to do is add the method below and then code what you want to happen.

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
    if (motion == UIEventSubtypeMotionShake) {
        // Insert your code here

Leave a Comment