I used to detect shake movement from AppDelegate by simply following this method:
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event { NSLog(@"shake shake shake"); }
which works fine in iOS 8 and 9. However, it no longer works in iOS 10. I also tried adding
- (BOOL)canBecomeFirstResponder { return YES; }
but it did not help. However, this works great in UIViewControllers. Has something changed in iOS 10, or is it just a mistake?
ios iphone uikit ios10 uiresponder
almas
source share