IOS-1212 toolbar is restored to it's default value after leaving from settings view
authorXavier Algarra <xavier@pep-project.org>
Wed, 01 Aug 2018 21:29:19 +0200
changeset 5666a32e25ec501d
parent 5665 5911fc5985ad
child 5667 b82931788188
IOS-1212 toolbar is restored to it's default value after leaving from settings view
pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift
     1.1 --- a/pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift	Wed Aug 01 19:59:27 2018 +0200
     1.2 +++ b/pEpForiOS/UI/AccountsAndFolders/AccountsTableViewController.swift	Wed Aug 01 21:29:19 2018 +0200
     1.3 @@ -32,9 +32,13 @@
     1.4          title = NSLocalizedString("Settings", comment: "Settings view title")
     1.5          UIHelper.variableCellHeightsTableView(self.tableView)
     1.6      }
     1.7 +    var oldToolbarStatus : Bool = true
     1.8  
     1.9      override func viewWillAppear(_ animated: Bool) {
    1.10          super.viewWillAppear(animated)
    1.11 +        if let nc = self.navigationController {
    1.12 +            oldToolbarStatus = nc.isToolbarHidden
    1.13 +        }
    1.14          self.navigationController?.setToolbarHidden(true, animated: false)
    1.15  
    1.16          if MiscUtil.isUnitTest() {
    1.17 @@ -43,6 +47,10 @@
    1.18          }
    1.19          updateModel()
    1.20      }
    1.21 +
    1.22 +    override func viewWillDisappear(_ animated: Bool) {
    1.23 +        self.navigationController?.setToolbarHidden(oldToolbarStatus, animated: false)
    1.24 +    }
    1.25      
    1.26      // MARK: - Internal
    1.27