0
我有这个我viewcontroller.miPhone摇事件不起作用
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.type == UIEventSubtypeMotionShake) {
NSLog(@"shake shake shake");
}
}
- (void)viewDidLoad
{
[self performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0.3];
}
里面可是当我动摇我的手机没有任何反应。为什么?