Skip to content

Commit

Permalink
Fix members drawer appearing below the app on iPads with a gesture bar
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Oct 16, 2019
1 parent e95767d commit e066f6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion ECSlidingViewController/ECSlidingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 3 additions & 1 deletion IRCCloud/Classes/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
75
77

0 comments on commit e066f6b

Please sign in to comment.