title: Unable to connect IBOutlet to XIB File
body: <p>I am trying to implement Koloda card swiping style.  I have created a .xib file structured as Image 1 &amp; 2.<a href="https://i.stack.imgur.com/gR8PT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gR8PT.jpg" alt="xib file structure"></a></p>
  
  <p>As you can see in Image 1, I have set the File's Owner as the XIB Files custom class.</p>
  
  <p>In image 2, I have left the class blank (not sure if this is correct)</p>
  
  <p>My NIB class is per the below code.</p>
  
  <pre><code>import UIKit
  import Koloda
  
  class CardView: KolodaView {
  
  var view: UIView!
  var nibName: String = "CardView"
  var uid: String!
  
  @IBOutlet weak var profileImage: UIImageView!
  @IBOutlet weak var nameLabel: UILabel!
  
  required init?(coder aDecoder: NSCoder) {
      super.init(coder: aDecoder)
      setUp()
  }
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      setUp()
  }
  
  func setUp() {
  
      view = loadViewFromNib()
  
      view.frame = bounds
      view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
      view.isUserInteractionEnabled = true
      addSubview(view)
  
  }
  
  func loadViewFromNib() -&gt; UIView {
      let bundle = Bundle(for: CardView.self)
      let nib = UINib(nibName: String(describing: CardView.self), bundle: bundle)
      let view = nib.instantiate(withOwner: self, options: nil)[0] as! UIView
  
      return view
  }
  }
  </code></pre>
  
  <p>In my controller, I have the view for index as per the below;</p>
  
  <pre><code>func koloda(_ koloda: KolodaView, viewForCardAt index: Int) -&gt; UIView {
  
      _ = userResults[Int(index)]
  
      let bundle = Bundle(for: CardView.self)
      let nib = UINib(nibName: String(describing: CardView.self), bundle: bundle)
      let view = nib.instantiate(withOwner: self, options: nil)[0] as! UIView
  
      return view
  }
  </code></pre>
  
  <p>I am unable to insert my IBOutlets and reference them in my UIViewController.  As I will be getting geoFire &amp; FirDatabase info and populating the views.  I understand this has something to do with the File's Owner.  I'm just unsure on how to set the IBOutlets to the subview instead of the custom class.</p>
  
  <p>Any help appreciated.</p>