title: How to make programmatically generated UIButton do default animation on press?
body: <p>I am attempting to program in swift without storyboards/interface builder. When I press a UIButton, it does not change color like it would had I created it on the storyboard file. How can I enable this visual feature?</p>
  
  <p>Here is (roughly) my code:</p>
  
  <pre><code>import UIKit
  class MyView: UIView {
      var myButton: UIButton
      init(buttonTitle: String) {
          myButton = UIButton()
          myButton.translateAutoresizingMaskIntoConstraints = false
          myButton.setTitle(buttonTitle, forState: .Normal)
          myButton.setTitleColor(.blueColor(), forState: .Normal)
          super.init(frame: CGRect())
          addSubview(myButton)
          var layoutConstraints = [NSLayoutConstraints]()
          //... autolayout ...
          NSLayoutConstraint.activateConstraints(layoutConstraints)
      }
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>