问题描述
- 在设备中震动模式无法实现
- 代码:
-(void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shake) name:@""shake"" object:nil]; if(event.type == UIEventTypeMotion && event.subtype == UIEventSubtypeMotionShake) { // SOMETHING HERE } NSLog(@""motion Began""); } else { NSLog(@""Shake Is Over""); }}
震动模式没有实现。
时间: 2024-10-29 06:06:39