Skip to content

Instantly share code, notes, and snippets.

@dkotama
Created September 10, 2018 00:10
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 dkotama/bb94a623c1037d7b948eccbf78e0a636 to your computer and use it in GitHub Desktop.
Save dkotama/bb94a623c1037d7b948eccbf78e0a636 to your computer and use it in GitHub Desktop.
Swift Question Modal
let alert = UIAlertController(title: NSLocalizedString("logout_confirm", comment: ""), message: "", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { action in
self.pushLogout()
}))
alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))
self.present(alert, animated: true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment