- (void)viewDidLoad
{
[superviewDidLoad];
/// 设置Controller支持摇动
[[UIApplication sharedApplication] setApplicationSupportsShakeToEdit:YES]; /// 同时让他成为第一相应者: [self becomeFirstResponder];}
/// 检测到摇动- (void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{}/// 摇动取消- (void) motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event{}/// 摇动结束- (void) motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if (event.subtype == UIEventSubtypeMotionShake)
{ } }