Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Provide a warning to implementor when container view has mismatched configuration #681

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
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 Container View that has a different setting for hidesBottomBarWhenPushed. If unintended, this will lead to incorrect bottom margin calculations.");
}
return CGRectGetHeight(tabBar.frame);
}
}
Expand Down