IOS-1620 cancel button is not shown in settings view IOS-1620
authorXavier Algarra <xavier@pep-project.org>
Wed, 05 Jun 2019 15:54:48 +0200
branchIOS-1620
changeset 891307d467d16490
parent 8893 7b0265665e8b
child 8954 9536f786d6da
IOS-1620 cancel button is not shown in settings view
pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift
     1.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift	Mon Jun 03 14:30:46 2019 +0200
     1.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/AccountSettingsTableViewController.swift	Wed Jun 05 15:54:48 2019 +0200
     1.3 @@ -61,6 +61,16 @@
     1.4          passwordTextfield.delegate = self
     1.5      }
     1.6  
     1.7 +    override func viewWillAppear(_ animated: Bool) {
     1.8 +        super.viewWillAppear(animated)
     1.9 +        guard let isIphone = splitViewController?.isCollapsed else {
    1.10 +            return
    1.11 +        }
    1.12 +        if !isIphone {
    1.13 +            self.navigationItem.leftBarButtonItem = nil// hidesBackButton = true
    1.14 +        }
    1.15 +    }
    1.16 +
    1.17      private func configureView() {
    1.18          tableView.addSubview(spinner)
    1.19  
    1.20 @@ -232,11 +242,6 @@
    1.21          }
    1.22          if isIphone {
    1.23              (self.navigationController?.parent as? UINavigationController)?.popViewController(animated: true)
    1.24 -        } else {
    1.25 -            //self.parent?.parent?.dismiss(animated: true, completion: nil)
    1.26 -            //(self.navigationController?.parent as? UINavigationController)?.popViewController(animated: true)
    1.27 -            //view.window?.rootViewController?.dismiss(animated: true, completion: nil)
    1.28 -            
    1.29          }
    1.30      }
    1.31