首页 > 移动平台 > 详细

ios摇一摇

时间:2015-04-24 18:49:52      阅读:210      评论:0      收藏:0      [点我收藏+]

-(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");

}

ios摇一摇

原文:http://www.cnblogs.com/punkrocker/p/4454109.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!