From e066f6bb111ada3b0dfda27e46ad9b77a3ef362c Mon Sep 17 00:00:00 2001 From: Sam Steele Date: Wed, 16 Oct 2019 12:12:12 -0400 Subject: [PATCH] Fix members drawer appearing below the app on iPads with a gesture bar --- ECSlidingViewController/ECSlidingViewController.m | 12 +++++++++++- IRCCloud/Classes/MainViewController.m | 4 +++- build-scripts/BUILD | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ECSlidingViewController/ECSlidingViewController.m b/ECSlidingViewController/ECSlidingViewController.m index 43d1867a2..299cd2b18 100644 --- a/ECSlidingViewController/ECSlidingViewController.m +++ b/ECSlidingViewController/ECSlidingViewController.m @@ -654,6 +654,11 @@ - (void)updateUnderLeftLayout frame.size.height = self.view.bounds.size.height - sbheight; if([UIApplication sharedApplication].statusBarFrame.size.height > 20 && [[UIDevice currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPad) frame.size.height += 20; + if(@available(iOS 11, *)) { + if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { + frame.size.height -= self.view.safeAreaInsets.bottom; + } + } self.underLeftView.frame = frame; } @@ -703,8 +708,13 @@ - (void)updateUnderRightLayout CGRect frame = self.underRightView.frame; frame.origin.y = sbheight; frame.size.height = self.view.bounds.size.height - sbheight; - if([UIApplication sharedApplication].statusBarFrame.size.height > 20) + if([UIApplication sharedApplication].statusBarFrame.size.height > 20 && [[UIDevice currentDevice] userInterfaceIdiom] != UIUserInterfaceIdiomPad) frame.size.height += 20; + if(@available(iOS 11, *)) { + if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { + frame.size.height -= self.view.safeAreaInsets.bottom; + } + } self.underRightView.frame = frame; } diff --git a/IRCCloud/Classes/MainViewController.m b/IRCCloud/Classes/MainViewController.m index aa9b252d9..603642d34 100644 --- a/IRCCloud/Classes/MainViewController.m +++ b/IRCCloud/Classes/MainViewController.m @@ -3349,9 +3349,11 @@ -(void)transitionToSize:(CGSize)size { frame.size.width -= self->_buffersView.tableView.frame.size.width; self->_connectingView.frame = self->_titleView.frame = frame; + [self _updateUserListVisibility]; + [self.view layoutIfNeeded]; + [self _updateTitleArea]; [self _updateServerStatus]; - [self _updateUserListVisibility]; [self _updateGlobalMsg]; [self.view layoutIfNeeded]; diff --git a/build-scripts/BUILD b/build-scripts/BUILD index a76c74dce..780fea92d 100644 --- a/build-scripts/BUILD +++ b/build-scripts/BUILD @@ -1 +1 @@ -75 \ No newline at end of file +77 \ No newline at end of file