Skip to content

Instantly share code, notes, and snippets.

@nathangitter
Created October 29, 2017 14:40
Show Gist options
  • Save nathangitter/fb042b286f0133b574f357b5659b3f1a to your computer and use it in GitHub Desktop.
Save nathangitter/fb042b286f0133b574f357b5659b3f1a to your computer and use it in GitHub Desktop.
override func viewDidLoad()
let button = UIButton()
button.addTarget(self, action: #selector(uiButtonAction), for: .touchUpInside)
view.addSubview(button)
}
@objc private func uiButtonAction() {
print("UIButton pressed!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment