首页 > iPhone如何实现微信的摇一摇功能?

iPhone如何实现微信的摇一摇功能?

如何实现微信一样的摇一摇功能,如何通过代码实现检测iPhone摇晃?

http://developer.apple.com/library/io...

http://homepages.ius.edu/rwisman/C490...

http://www.edumobile.org/iphone/iphon...

http://www.ifans.com/forums/threads/t...
http://tech.pro/tutorial/968/iphone-t...


- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
    if (motion == UIEventSubtypeMotionShake)
    {
        NSLog(@"shaked");
    }
}
【热门文章】
【热门文章】