Skip to content

Instantly share code, notes, and snippets.

@zontan
Created July 6, 2020 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zontan/2785cc0d88ca0f97e6bf616328d0db91 to your computer and use it in GitHub Desktop.
Save zontan/2785cc0d88ca0f97e6bf616328d0db91 to your computer and use it in GitHub Desktop.
var isLocalCall = true {
didSet {
updateLockTitle()
}
}
var callLocked = false {
didSet {
updateLockTitle()
}
}
func updateLockTitle() {
if isLocalCall {
if callLocked {
lockButton.setTitle("Unlock", for: .normal)
} else {
lockButton.setTitle("Lock", for: .normal)
}
} else {
lockButton.setTitle("Exit", for: .normal)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment