Skip to content

Instantly share code, notes, and snippets.

@danstepanov
Created February 8, 2016 07:25
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 danstepanov/9d0f6b2f480b683abd64 to your computer and use it in GitHub Desktop.
Save danstepanov/9d0f6b2f480b683abd64 to your computer and use it in GitHub Desktop.
lazy var button: UIButton! = {
let view = UIButton()
view.translatesAutoresizingMaskIntoConstraints = false
view.addTarget(self, action: "buttonPressed", forControlEvents: .TouchDown)
view.setTitle("Press Me!", forState: .Normal)
return view
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment