title: Be able to load xib from both Storyboard and ViewController
body: <p>I'm trying to create the perfect solution to make a custom <code>UIView</code> subclass directly from code and in <code>Storyboard</code>. However, I didn't found any solution.</p>
  
  <p>For an <code>IBDesignable</code> solution through storyboard, I followed this example <a href="http://supereasyapps.com/blog/2014/12/15/create-an-ibdesignable-uiview-subclass-with-code-from-an-xib-file-in-xcode-6" rel="nofollow">http://supereasyapps.com/blog/2014/12/15/create-an-ibdesignable-uiview-subclass-with-code-from-an-xib-file-in-xcode-6</a> and works perfectly. </p>
  
  <p>But if I try to call this subclass through <code>UIViewController</code> by calling this Extension method:</p>
  
  <pre><code>extension UIView {
      class func loadFromNibNamed(nibNamed: String, bundle : NSBundle? = nil) -&gt; UIView? {
          return UINib(
              nibName: nibNamed,
              bundle: bundle
          ).instantiateWithOwner(nil, options: nil)[0] as? UIView
      }
  }
  </code></pre>
  
  <p>It crashes and says that misses <code>this class is not key value coding-compliant for the key</code>.</p>
  
  <p>Has anybody found a solution to share with me for have both possibilities?</p>
  
  <p>I need it because I should use this <code>UIView</code> in storyboard and also as <code>UITableview SectionHeader</code></p>