标签:
-(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");
}
标签:
原文地址:http://www.cnblogs.com/punkrocker/p/4454109.html