title: How to load xib to UIView subclass, Swift, iOS
body: <p>I have a <code>.xib</code> file called <code>ContentView</code> that I want to use as the view for a class called <code>ContentView</code>, however I cannot seem to load it.</p>
  
  <pre><code>class ContentView: UIView {
      override init() {
          super.init(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
      }
  
      required init(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          fatalError("init(coder:) has not been implemented")
      }
  }
  </code></pre>
  
  <p>I'm aware that you can load a <code>xib</code> using the following method but this gives a error when I do so:</p>
  
  <pre><code>var contentViewXib: NSArray = NSBundle.mainBundle().loadNibNamed("ContentView", owner: nil, options: nil)
  </code></pre>
  
  <p>I have also set the <code>xibs</code> files owner to <code>ContentView</code> and set its Custom Class in interface builder to the class I want to use it with.</p>
  
  <p>Any help is appreciated. Thanks</p>