1.UIViewController
- (BOOL)canBecomeFirstResponder
{
return YES;
}
Return to "YES" when not activated, the case "NO" is possible
Shake the phone to realize it, the method must return YES
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if (motion == UIEventSubtypeMotionShake) {
}
}
I hope the author will give you a solution, thank you