Make screen block view first responder.

This commit is contained in:
Matthew Chen 2018-04-17 09:45:02 -04:00
parent 6ccf93e929
commit 9364af9b85
2 changed files with 7 additions and 0 deletions

View file

@ -438,6 +438,8 @@ const UIWindowLevel UIWindowLevel_Background = -1.f;
// Show the blocking window in front of the status bar.
self.screenBlockingWindow.windowLevel = UIWindowLevelStatusBar + 1;
self.rootWindow.hidden = YES;
[self.screenBlockingWindow becomeFirstResponder];
OWSAssert([self.screenBlockingWindow isFirstResponder]);
} else {
self.screenBlockingWindow.windowLevel = UIWindowLevel_Background;
[self.rootWindow makeKeyAndVisible];

View file

@ -136,4 +136,9 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
[self.delegate unlockButtonWasTapped];
}
- (BOOL)canBecomeFirstResponder
{
return YES;
}
@end