title: Swift Initialization - Why are multiple init functions being called?
body: <p>Here's is my class with override inits</p>
  
  <pre><code>class BottomView: UIView {
  
      // MARK: - initilization
  
     override init() {
          println("init")
          super.init()
          setup()
      }
  
      override init(frame: CGRect) {
          println("init frame")
          super.init(frame: frame)
          setup()
      }
  
      required init(coder aDecoder: NSCoder) {
          println("init decoder")
          super.init(coder: aDecoder)
          setup()
      }
  
      func setup() {
          println("setup")
      }
  }
  </code></pre>
  
  <p>I then initialize in my ViewController with the following code</p>
  
  <pre><code>class ViewController: UIViewController {
  
      let bottomView = BottomView()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Do any additional setup after loading the view, typically from a nib.
  
          bottomView.frame = CGRectMake(0.0, self.view.frame.height/2.0, self.view.frame.width, self.view.frame.height/2.0)
          bottomView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleTopMargin
          self.view.addSubview(bottomView)
  
      }
  }
  </code></pre>
  
  <p>And my output is </p>
  
  <pre><code>init
  init frame
  setup
  setup
  </code></pre>
  
  <p>So my question is, why is init(frame:) being called?  </p>