title: How can I call the tableView on viewDidLoad?
body: <p>I'm new to iOS and I'm trying to output the data from the <code>selectedContact</code>. It works with the <code>addressLabel.text</code> but I don't know how to call it when it's a table view?</p>
  <pre><code>class ContactDetailsVC: UITableViewController {
  
      @IBOutlet var contactDetailsTableView: UITableView!
      
      @IBOutlet var addressLabel: UILabel!
      
      let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
      
      var persons = [Persons]()
      
      var selectedContact: Persons? {
          didSet {
              getContactDetails()
          }
      }
              
      override func viewDidLoad() {
          super.viewDidLoad()
          
          title = &quot;Contact Details&quot;
          navigationController?.navigationBar.prefersLargeTitles = true
                  
          contactDetailsTableView = selectedContact?. // &lt;---- this line
          
          addressLabel.text = (&quot;Address \(selectedContact?.address ?? &quot;&quot;)&quot;)            
      }
      
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {               
         return 5               
      }
      
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          
          let cell = tableView.dequeueReusableCell(withIdentifier: &quot;contactDetailsCell&quot;, for: indexPath)
          
          cell.textLabel?.text = persons[indexPath.row].firstName! + &quot;\n&quot;
                               + persons[indexPath.row].lastName! + &quot;\n&quot;
                               + persons[indexPath.row].company! + &quot;\n&quot;
                               + persons[indexPath.row].phone! + &quot;\n&quot;
                               + persons[indexPath.row].email! + &quot;\n&quot;
          
          return cell
      }
  }
  </code></pre>