title: Assign xib to the UIView in Swift
body: <p>in objective c it can be done in init method by</p>
  
  <pre><code>-(id)init{
      self = [[[NSBundle mainBundle] loadNibNamed:@"ViewBtnWishList" owner:0 options:nil]     objectAtIndex:0];
  return self;
  }
  </code></pre>
  
  <p>but when i do this in swift</p>
  
  <pre><code>init(frame: CGRect) {
      self = NSBundle.mainBundle().loadNibNamed("ViewDetailMenu", owner: 0, options: nil)[0] as? UIView
  }
  </code></pre>
  
  <p>cannot assign to self in a method error is shown.
  now my approach is to create a view, and add the view loaded from nib to it.
  anyone have a better idea?</p>