title: Use of 'self' in property access 'frame' before super.init initializes self
body: <p>I have this code </p>
  
  <pre><code>import UIKit
  
  class CardView: UIView {
  
      @IBOutlet var imageView: UIImageView!
  
      init(imageView: UIImageView) {
          self.imageView = imageView
          super.init(frame: CGRect(x: 0, y:0, width: self.frame.size.width, height: self.frame.size.height))
      }
  
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  
  }
  </code></pre>
  
  <p>I get an error at the line: </p>
  
  <pre><code>super.init(frame: CGRect(x: 0, y:0, width: self.frame.size.width, height: self.frame.size.height))
  </code></pre>
  
  <p>The error says <code>Use of 'self' in property access 'frame' before super.init initializes self</code></p>
  
  <p>I don't have any idea how to solve this.</p>
  
  <p>Please bare in mind I am from an objective - C background and recently started learning swift.</p>