Use StateValue constants instead of raw value

This commit is contained in:
Haoyu Qiu
2017-10-20 23:58:52 +08:00
parent 77b8450f80
commit d50565f859
2 changed files with 12 additions and 12 deletions

View File

@ -48,9 +48,9 @@ class ProxyInterfacesViewCtrl: NSViewController, NSTableViewDataSource, NSTableV
let networkService = networkServices[row] as! [String: Any]
let key = networkService["key"] as! String
if selectedNetworkServices.contains(key) {
cell.state = NSControl.StateValue(rawValue: 1)
cell.state = .on
} else {
cell.state = NSControl.StateValue(rawValue: 0)
cell.state = .off
}
let userDefinedName = networkService["userDefinedName"] as! String
cell.title = userDefinedName