diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d2ab34..cd1e3b44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change Log ## [Version 1.9.7](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.7) +- Add a warning to console about potential configuration issues when embedding SlackTextViewController into a UIContainerView when there is a configuration mismatch between SlackTextViewController and parent. By @rromanchuk (#668) #### Features: diff --git a/Source/SLKTextViewController.m b/Source/SLKTextViewController.m index 6636d0fb..3bd1a7b4 100644 --- a/Source/SLKTextViewController.m +++ b/Source/SLKTextViewController.m @@ -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 Container View that has a different setting for hidesBottomBarWhenPushed. If unintended, this will lead to incorrect bottom margin calculations."); + } return CGRectGetHeight(tabBar.frame); } }