title: Swift: tableView.reloadData() no data in table
body: <p>I am having trouble with the reloadData() in my table.
  I have setup the table and cell, and added tables and even made a separate class for the cell in case this was the problem.
  I just cannot load any data into the table..... I have read questions on here and other sites but none of the solutions are giving me solutions... 
  I see that it is also a bug but it is working in a different project so its not my Xcode version. 
  I have tried loading in the viewDidLoad, inside the cellForRowAt, and also using Dispatch to put it on the main thread inside and outside a function. I also tried a button in desperation but still not luck. Here is my code if you spot anything I have missed id appreciate the help. </p>
  
  <pre><code>//
  //  VCRoster.swift
  //  MC
  //
  //  Created by James McAdam on 08/07/2018.
  //  Copyright © 2018 James McAdam. All rights reserved.
  //
  
  import UIKit
  
  class VCRoster: UIViewController, UITableViewDelegate, UITableViewDataSource {
  
  var tableViewData: [Roster] = []
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return tableViewData.count
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = rosterTable.dequeueReusableCell(withIdentifier: "rosterCell") as? rosterCell
  
      cell!.dateLbl.text = tableViewData[indexPath.row].date
      //Have also tried ? with the cell
      cell!.messageLbl.text = tableViewData[indexPath.row].message
  
      tableView.reloadData()
     return cell!
  }
  
  
  @IBOutlet weak var rosterTable: UITableView!
  
  @IBAction func load(_ sender: UIBarButtonItem) {
        self.rosterTable.reloadData()
  }
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
   //   dispatchMain().async {
   //       self.rosterTable.reloadData()
   //   }
  
       // self.rosterTable.reloadData()
  
      getDataFromServer(for: "Bx7faf08A9fYJ7bZCNMUX9EzxYN2") { (result) in
          // Check our result
          switch result {
          case .success(let results):
            //  print("Done")
              self.tableViewData = results.data
              //self.tablewView.reloadData()
              //self.rosterTable.reloadData()
          //    print(results)
          case .failure(let message):
          //    print("Error")
              print(message)
          }
      }
  
  }
  
  
  }
  </code></pre>