title: Subviews not recognized in UIViewController connected to xib file
body: <p>I have a UIViewController swift file that's connected to xib file (I clicked create xib when I created the viewController). Now, it doesn't recognize any subview in the main view.</p>
  
  <p>When I write "po self.view.subviews" while debugging. It returns 0. all subViews (a tableView and textView and label) = nil. I even created a new project and still get the same error.
  Im at loss here.</p>
  
  <p>Here's my code from the AboutUsViewController swift file:</p>
  
  <p>import UIKit</p>
  
  <p>import Foundation</p>
  
  <p>class AboutUsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {</p>
  
  <pre><code>@IBOutlet weak var textView: UITextView! 
  
  @IBOutlet weak var contactsTableView: UITableView!
  
  let items = ["Item 1", "Item2", "Item3", "Item4"]
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      let NibName = UINib(nibName: "ContactUsTableViewCell", bundle: nil)
      contactsTableView.register(NibName, forCellReuseIdentifier: "ContactUsTableViewCell")
  
      // Do any additional setup after loading the view.®
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  
  /*
  // MARK: - Navigation
  
  // In a storyboard-based application, you will often want to do a little preparation before navigation
  override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      // Get the new view controller using segue.destinationViewController.
      // Pass the selected object to the new view controller.
  }
  */
  // MARK: - Table view data source
  
  func numberOfSections(in tableView: UITableView) -&gt; Int {
      return 1
  }
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return items.count
  }
  
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      if (indexPath.item == 0) {
          let cell = tableView.dequeueReusableCell(withIdentifier: "ContactUsTableViewCell", for: indexPath) as! ContactUsTableViewCell
          cell.label.text = "HIII"
          return cell
  
      } else {
          let cell = tableView.dequeueReusableCell(withIdentifier: "ContactUsTableViewCell", for: indexPath) as! ContactUsTableViewCell
          cell.label.text = items[indexPath.item]
          return cell
      }
  }
  func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
      if (indexPath.item == 0) {
          return 200
      } else {
          return 86
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><a href="https://i.stack.imgur.com/lLSWw.png" rel="nofollow noreferrer">my swift file</a></p>
  
  <p><a href="https://i.stack.imgur.com/QqGKv.png" rel="nofollow noreferrer">my xib file</a></p>