#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
// 开始摇一摇
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
NSLog(@"开始摇一摇");
}
// 结束摇一摇
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
NSLog(@"结束摇一摇");
}
// 摇一摇被取消
- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
NSLog(@"取消摇一摇");
}
@end
实用知识:摇一摇功能的方法使用(真简单??)
最新推荐文章于 2021-03-07 10:18:03 发布