Skip to content

Commit

Permalink
Make the terminal fullscreen if the keyboard is floating
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Jun 27, 2020
1 parent f595cb2 commit 5cd6953
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/TerminalViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ - (void)keyboardDidSomething:(NSNotification *)notification {
NSLog(@"%@ %@", notification.name, [NSValue valueWithCGRect:keyboardFrame]);
self.hasExternalKeyboard = keyboardFrame.size.height < 100;
CGFloat pad = UIScreen.mainScreen.bounds.size.height - keyboardFrame.origin.y;
if (pad != keyboardFrame.size.height) {
pad = 0; // keyboard is not right at the bottom of the screen, must be floating or something
}
if (pad == 0) {
pad = self.view.safeAreaInsets.bottom;
}
Expand Down

0 comments on commit 5cd6953

Please sign in to comment.