title: Load a UIView from nib in Swift
body: <p>Here is my Objective-C code which I'm using to load a nib for my customised <code>UIView</code>:</p>
  
  <pre><code>-(id)init{
  
      NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"myXib" owner:self options:nil];
      return [subviewArray objectAtIndex:0];
  
  }
  </code></pre>
  
  <p>What is the equivalent code in Swift?</p>