私はこれをviewcontroller.mの中に持っています
- (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];
}
しかし、携帯を振っても何も起こりません。なんで?