IOS-1211 fixes: navigationBar hidden when pushed from VC with active SearchBar
authorbuff <andreas@pep-project.org>
Wed, 15 Aug 2018 19:09:32 +0200
changeset 5841b85f54bfc3af
parent 5840 9779eb8ec404
child 5842 2ecc59e25096
IOS-1211 fixes: navigationBar hidden when pushed from VC with active SearchBar
pEpForiOS/UI/Thread/ThreadViewController.swift
     1.1 --- a/pEpForiOS/UI/Thread/ThreadViewController.swift	Wed Aug 15 18:34:43 2018 +0200
     1.2 +++ b/pEpForiOS/UI/Thread/ThreadViewController.swift	Wed Aug 15 19:09:32 2018 +0200
     1.3 @@ -27,6 +27,7 @@
     1.4  
     1.5      override func viewDidLoad() {
     1.6          super.viewDidLoad()
     1.7 +        assureNavigationBarVisible()
     1.8          configureSplitViewBackButton()
     1.9          guard let model = model else {
    1.10              return
    1.11 @@ -50,12 +51,18 @@
    1.12          }
    1.13      }
    1.14  
    1.15 +    private func assureNavigationBarVisible() {
    1.16 +        // When pushed from a ViewController with active SearchBar, the navigation bar might be
    1.17 +        // hidden.
    1.18 +        navigationController?.isNavigationBarHidden = false
    1.19 +    }
    1.20 +
    1.21      private func configureSplitViewBackButton() {
    1.22          self.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem
    1.23          self.navigationItem.leftItemsSupplementBackButton = true
    1.24      }
    1.25  
    1.26 -    internal func isSplitViewControllerCollapsed() -> Bool! {
    1.27 +    func isSplitViewControllerCollapsed() -> Bool! {
    1.28          guard let splitViewController = self.splitViewController else {
    1.29              Log.shared.errorAndCrash(component: #function, errorString: "We need a splitViewController here")
    1.30              return nil