Skip to content

Instantly share code, notes, and snippets.

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 Koze/72a14cb2b423d0a3e230c45eaa3f0c95 to your computer and use it in GitHub Desktop.
Save Koze/72a14cb2b423d0a3e230c45eaa3f0c95 to your computer and use it in GitHub Desktop.
Implicitly using UIControlEventPrimaryActionTriggered
let button = UIButton(frame: frame, primaryAction: action)
// implicitly
let button = UIButton(frame: frame)
button.addAction(action: action, for: .primaryActionTriggered)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment