Latest 0.2.0
License MIT
Platforms ios , requires ARC
Frameworks Foundation, UIKit

A tiny category, with a single method to send out a NSNotifiatication if a shake is detected :)


CocoaPods (preferred)

add the following to your Podfile

pod "DHCShakeNotifier"


add contents of DHCShakeNotifier to your project


Clone/ download the repo and take a quick look at the demo.

  1. import DHCShakeNotifier:

    #import "UIWindow+DHCShakeRecognizer.h"
  2. listen for shake notification by adding an NSNotification observer :

    @implementation YourObject
        if (self==[super init]) {
            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(methodThatIsCalledAfterShake) name:DHCSHakeNotificationName object:nil];
       return self;
     NSLog(@""I have just been shaken" - A martini after being ordered by James Bond");
        [[NSNotificationCenter defaultCenter] removeObserver:self name:DHCSHakeNotificationName object:nil];

Latest podspec

    "name": "DHCShakeNotifier",
    "version": "0.2.0",
    "summary": "A very simple category that sends out an NSNotification whenever the device is shaken.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Daniel Haight": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.0"
    "platforms": {
        "ios": null
    "source_files": "DHCShakeNotifier",
    "frameworks": [
    "requires_arc": true

Pin It on Pinterest

Share This