Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 38fc770bea
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.73 kB
//
// AWindowThatDetectsShakes.m
// Meemi
//
// Created by Giacomo Tufano on 13/04/10.
//
// Copyright 2011, Giacomo Tufano (gt@ilTofa.it)
// Licensed under MIT license. See LICENSE file or http://www.opensource.org/licenses/mit-license.php
//
#import "AWindowThatDetectsShakes.h"
// This is only to post a global notification when device is shaken...
// works because in MainWindow.xib the UIWindow is set to this one.
@implementation AWindowThatDetectsShakes
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (event.type == UIEventTypeMotion && event.subtype == UIEventSubtypeMotionShake)
[[NSNotificationCenter defaultCenter] postNotificationName:@"deviceShaken" object:self];
}
@end
Jump to Line
Something went wrong with that request. Please try again.