手机晃动

- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{
    
    if (event.subtype == UIEventSubtypeMotionShake) {
        
        NSLog(@"摇晃中");
    }
}

- (BOOL)canBecomeFirstResponder{
    
    return YES;
}

 

posted @ 2015-07-15 21:24  Emyin  阅读(145)  评论(0编辑  收藏  举报