title: difference between override init and required init? - swift
body: <p>I sometimes see a view made like this where there is the same setup() function in two different init methods. What is the difference between the init methods and why is the same setup() being called in both..?</p>
  
  <pre><code>class BigButton: UIButton {
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          setup()
      }
  
      required init?(coder: NSCoder) {
          super.init(coder: coder)
          setup()
      }
  
      fileprivate func setup() {
          // set up stuff
      }
  }
  </code></pre>