Skip to content

Commit 1f3659d

Browse files
author
Ignacio Romero Zurbuchen
committed
Considers hidesBottomBarWhenPushed too. Fixes slackhq#362
1 parent 1df4c0f commit 1f3659d

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

Examples/Messenger-Storyboard/Base.lproj/Main.storyboard

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0WO-Kt-Oxc">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0WO-Kt-Oxc">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
66
</dependencies>
77
<scenes>
88
<!--Message View Controller-->
99
<scene sceneID="tne-QT-ifu">
1010
<objects>
11-
<viewController id="BYZ-38-t0r" customClass="MessageViewController" sceneMemberID="viewController">
11+
<viewController hidesBottomBarWhenPushed="YES" id="BYZ-38-t0r" customClass="MessageViewController" sceneMemberID="viewController">
1212
<layoutGuides>
1313
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
1414
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>

Source/SLKTextViewController.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,12 @@ - (CGFloat)slk_appropriateBottomMargin
416416
{
417417
// A bottom margin is required only if the view is extended out of it bounds
418418
if ((self.edgesForExtendedLayout & UIRectEdgeBottom) > 0) {
419-
if (self.tabBarController) {
420-
return CGRectGetHeight(self.tabBarController.tabBar.frame);
419+
420+
UITabBar *tabBar = self.tabBarController.tabBar;
421+
422+
// Considers the bottom tab bar, unless it will be hidden
423+
if (tabBar && !tabBar.hidden && !self.hidesBottomBarWhenPushed) {
424+
return CGRectGetHeight(tabBar.frame);
421425
}
422426
}
423427

0 commit comments

Comments
 (0)