Hide "Edit" in provider profiles

This commit is contained in:
Davide De Rosa 2018-11-03 22:23:26 +01:00
parent 860750332f
commit 2525467fe9
2 changed files with 4 additions and 1 deletions

View File

@ -35,10 +35,12 @@ class ServiceViewController: UIViewController, TableModelHost {
@IBOutlet private weak var labelWelcome: UILabel!
@IBOutlet private weak var itemEdit: UIBarButtonItem!
var profile: ConnectionProfile? {
didSet {
title = profile?.id
navigationItem.rightBarButtonItem?.isEnabled = (profile?.context == .host)
navigationItem.rightBarButtonItem = (profile?.context == .host) ? itemEdit : nil
reloadModel()
updateViewsIfNeeded()
}

View File

@ -223,6 +223,7 @@
</barButtonItem>
</navigationItem>
<connections>
<outlet property="itemEdit" destination="gbN-fY-AoW" id="DGl-oS-ZSe"/>
<outlet property="labelWelcome" destination="jEt-mV-gjN" id="kaN-fX-eRE"/>
<outlet property="tableView" destination="14D-an-pBY" id="qzB-YR-Pss"/>
<outlet property="viewWelcome" destination="p0F-IK-RD6" id="pGB-3J-Rwj"/>