mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-04-29 12:35:00 +08:00
hide tab bar when collapsing on some VCs, fixes #296
This commit is contained in:
@@ -25,6 +25,7 @@ final class SplitViewControllerDelegate: UISplitViewControllerDelegate {
|
||||
|
||||
// remove any placeholder VCs from the stack
|
||||
primaryNav.viewControllers += secondaryNav.viewControllers.filter {
|
||||
$0.hidesBottomBarWhenPushed = true
|
||||
return ($0 is SplitPlaceholderViewController) == false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ class SplitViewTests: XCTestCase {
|
||||
let right2 = RootViewController()
|
||||
let right3 = UIViewController()
|
||||
let right4 = UIViewController()
|
||||
right2.hidesBottomBarWhenPushed = true
|
||||
rightNav.pushViewController(right1, animated: false)
|
||||
rightNav.pushViewController(right2, animated: false)
|
||||
rightNav.pushViewController(right3, animated: false)
|
||||
@@ -126,6 +127,11 @@ class SplitViewTests: XCTestCase {
|
||||
XCTAssertEqual(rightNav.viewControllers[1], right2)
|
||||
XCTAssertEqual(rightNav.viewControllers[2], detail1)
|
||||
XCTAssertEqual(rightNav.viewControllers[3], detail2)
|
||||
|
||||
XCTAssertFalse(rightNav.viewControllers[0].hidesBottomBarWhenPushed)
|
||||
XCTAssertFalse(rightNav.viewControllers[1].hidesBottomBarWhenPushed)
|
||||
XCTAssertTrue(rightNav.viewControllers[2].hidesBottomBarWhenPushed)
|
||||
XCTAssertTrue(rightNav.viewControllers[3].hidesBottomBarWhenPushed)
|
||||
}
|
||||
|
||||
func test_whenCollapsing_withPlaceholderStackedOnDetail_thatVCsStackedWithoutPlaceholder() {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1743</string>
|
||||
<string>1748</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
|
||||
Reference in New Issue
Block a user