Skip to content

Instantly share code, notes, and snippets.

@ktustanowski
Created July 31, 2018 21:29
Show Gist options
  • Save ktustanowski/9dd0ded3a4f6a7cc01e49dec900409ad to your computer and use it in GitHub Desktop.
Save ktustanowski/9dd0ded3a4f6a7cc01e49dec900409ad to your computer and use it in GitHub Desktop.
@IBAction func selectCipher(_ sender: UISegmentedControl) {
guard let cipherName = CipherName(rawValue: sender.selectedSegmentIndex) else { return }
switch cipherName {
case .atbash:
encryptButton.isEnabled = true
decryptButton.isEnabled = true
default:
encryptButton.isEnabled = false
decryptButton.isEnabled = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment