title: Addsubview custom xib file error
body: <p>I'm using Swift 3, I have error adding xib file as subview</p>
  
  <pre><code>let bundle = Bundle(for: type(of: self))
      let nib = UINib(nibName: "CustomView", bundle: bundle)
      let view = nib.instantiate(withOwner: self, options: nil)[0] as! UIView
      view.frame = bounds
      view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
      self.addSubview(view);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/U5II1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U5II1.png" alt="enter image description here"></a></p>
  
  <p>Can someone help me please?</p>