Created
June 5, 2014 02:18
-
-
Save JeOam/645ed21a5fe059d5395c to your computer and use it in GitHub Desktop.
监听手机“摇一摇”动作
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event | |
{ | |
if (motion == UIEventSubtypeMotionShake) | |
{ | |
NSLog(@"shaked"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment