Skip to content

Commit

Permalink
large titles on ipad only
Browse files Browse the repository at this point in the history
  • Loading branch information
tominsam committed Nov 29, 2021
1 parent b14ac55 commit 1a058f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions flametouch/Base UI/CustomSplitViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class CustomSplitViewController: UISplitViewController {

public lazy var master = configure(StaticNavigationController()) {
$0.theme()
// Base nav VC is for iPad, then the split view is immediately
// collapsed for phones. Collapsing unsets prefersLargeTitles.
$0.navigationBar.prefersLargeTitles = true
}

private lazy var emptyViewController = configure(UIViewController()) {
Expand Down Expand Up @@ -99,6 +102,7 @@ extension CustomSplitViewController: UISplitViewControllerDelegate {
// only collapse if the right pane _isn't_ the empty state
master.viewControllers += detail.viewControllers
}
master.navigationBar.prefersLargeTitles = false
return true
}

Expand All @@ -110,6 +114,7 @@ extension CustomSplitViewController: UISplitViewControllerDelegate {
}
let restOfStack = Array(master.viewControllers[1...])
master.viewControllers = [top]
master.navigationBar.prefersLargeTitles = true
return makeNav(restOfStack)
}
}
Expand Down
2 changes: 0 additions & 2 deletions flametouch/Views/BrowseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class BrowseViewController: UIViewController {

tableView.registerReusableCell(SimpleCell.self)

navigationController?.navigationBar.prefersLargeTitles = true

// Suppress info button on mac because there's an about menu, but catalyst
// does want an explicit refresh button.
#if targetEnvironment(macCatalyst)
Expand Down

0 comments on commit 1a058f0

Please sign in to comment.