Skip to content

Commit

Permalink
provide a warning if the implementor is using a container view which …
Browse files Browse the repository at this point in the history
…may cuase SLKTextViewController to calculate incorrect bottom margin calculations. slackhq#668
  • Loading branch information
rromanchuk committed Aug 18, 2018
1 parent cade6bb commit 4ee595a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/SLKTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ - (CGFloat)slk_appropriateBottomMargin

// Considers the bottom tab bar, unless it will be hidden
if (tabBar && !tabBar.hidden && !self.hidesBottomBarWhenPushed) {
if (self.parentController && self.parentController.hidesBottomBarWhenPushed != self.hidesBottomBarWhenPushed) {
NSLog(@"WARNING!!!: Your SLKTextViewController is inside a UIContainerView that has a different setting for hidesBottomBarWhenPushed. If unintended, this will lead to incorrect bottom margin calculations.");
}
return CGRectGetHeight(tabBar.frame);
}
}
Expand Down

0 comments on commit 4ee595a

Please sign in to comment.