title: What happens when I am initializing my UIView in subclasses?
body: <p><strong>A.swift</strong></p>
  
  <pre><code>class A: UIView {
  
      override init() {
          super.init()
          println("init A")
      }
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          println("initFrame A")
      }
  }
  </code></pre>
  
  <p><strong>B.swift</strong></p>
  
  <pre><code>class B: A {
  
      override init() {
          super.init()
          //P1
          println("init B")
      }
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          println("initFrame B")
      }
  }
  </code></pre>
  
  <p>Then I call it <code>B()</code>:</p>
  
  <p>I have an output:</p>
  
  <pre><code>initFrame A
  initFrame B
  init A
  init B
  </code></pre>
  
  <p>I try to determine <strong>what?</strong> is called and <strong>when?</strong>... after <code>B()</code>. I wish to understand it completely.</p>
  
  <ol>
  <li><code>init()</code> in <code>A</code></li>
  <li><code>super.init()</code> in <code>init()</code> in <code>A</code></li>
  <li><code>init()</code> in <code>B</code></li>
  <li><code>super.init()</code> in <code>init()</code> in <code>B</code></li>
  <li><code>init()</code> in <code>UIView</code></li>
  <li><code>super.init()</code> in <code>init()</code> in <code>UIView</code></li>
  </ol>
  
  <p>now we are in <code>P1</code> point, right?</p>
  
  <ol start="7">
  <li><code>init()</code> calls <code>init(frame:)</code> in <code>B</code> with <code>CGRectZero</code></li>
  <li><code>super.init(frame:)</code> in <code>init(frame:)</code> in <code>B</code></li>
  <li><code>init(frame:)</code> in <code>A</code></li>
  <li><code>super.init(frame:)</code> in <code>init(frame:)</code> in <code>A</code></li>
  <li><code>init(frame:)</code> in <code>UIView</code></li>
  <li><code>super.init(frame:)</code> in <code>init(frame:)</code> in <code>UIView</code></li>
  </ol>
  
  <p>now we are getting back </p>
  
  <ol start="13">
  <li>called the rest of <code>init(frame:)</code> in <code>UIView</code></li>
  <li>called the rest of <code>init(frame:)</code> in <code>A</code> --> <strong>initFrame A</strong></li>
  <li>called the rest of <code>init(frame:)</code> in <code>B</code> --> <strong>initFrame B</strong></li>
  </ol>
  
  <p>The question is what is happening now? Where we are now? (inside <code>init()</code> in <code>UIView</code>?) Where are printed the lines with <code>init A</code> and <code>init B</code>?</p>
  
  <p>Thanks for help.</p>