-(void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion==UIEventSubtypeMotionShake)
NSLog(@"Shake begin");
}
-(void) motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion==UIEventSubtypeMotionShake)
NSLog(@"Shaked");
}
-(void) motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion==UIEventSubtypeMotionShake)
NSLog(@"Shake cancel");
}