title: Swift: Add a xib into a UIView
body: <p>I would like to add a custom UIView. The class definition of my custom view is:</p>
  
  <pre><code>class UserCoinView: UIView {
      @IBOutlet weak var userName: UILabel!
      @IBOutlet weak var coinView: UIView!
      @IBOutlet weak var coinAmount: UILabel!
      @IBOutlet weak var coinIcon: UILabel!
  
      override func drawRect(rect: CGRect) {
          let smartCoins = SmartShopperUtil.getSmartShopper().smartCoins
  
          if smartCoins != nil &amp;&amp; smartCoins &gt;= 0  {
              coinAmount.text = String(smartCoins!)
              coinView.backgroundColor = SmartShopperUtil.getSmartCoinBackgroundColor(SmartShopperUtil.getSmartShopper().smartCoins!)
          }
  
          userName.text = SmartShopperUtil.getSmartShopperNameWithFullName(SmartShopperUtil.getSmartShopper().name)
          coinIcon.text = AEVIcons.AEV_SMART_COIN
      }
  }
  </code></pre>
  
  <p>I have added a View in the ViewController I want to add this view, and I have set the custom class of this view as UserCoinView. After that, I have made a connection to the ViewController, and in this ViewController I have no idea what to do in order to display my custom UIView.</p>
  
  <p>Thanks in advance for your help.</p>