title: tableview reload data method being called, but not executing
body: <p>I have a tableview in my app, it must display a list of chat messages. I got the chat messages loaded into a <code>NSMutableArray</code> and after loading the data into the array, I need to update the tableview.</p>
  
  <p>here is the code I am using:</p>
  
  <pre><code>dispatch_async(dispatch_get_main_queue(), { () -&gt; Void in
      ("reloading data")
      self.tableView.reloadData()
  })
  </code></pre>
  
  <p>But it prints out <code>reloading data</code> but does not update / reload the tableview.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have realized that it is not calling this method:</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      println("running")
      let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "MyTestCell")
      println(listDataArray[indexPath.row])
      cell.textLabel?.text = (listDataArray[indexPath.row] as NSString)
      return cell
  }
  </code></pre>
  
  <p>but if I try and remove it, or comment it out, it them says the class does not conform to the protocols of the <code>UITableViewDataSource</code>.</p>
  
  <p>So then how can it just not call the method? <code>(NOTE: it is not printing "running" either)</code></p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>here is the code for the <code>tableview</code> methods (note I have changed the one slightly from when I posted above)</p>
  
  <pre><code>func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -&gt; Int {
      if(listDataArray.count &gt; 0) {
          return listDataArray.count
      } else {
          return 0
      }
  }
  
  func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -&gt; UITableViewCell!  {
      var cell = tableView.dequeueReusableCellWithIdentifier("CELL") as? UITableViewCell
  
      if !(cell != nil) {
          cell = UITableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "CELL")
      }
      cell?.textLabel?.text = listDataArray[indexPath.row] as? String
  
      return cell
  }
  </code></pre>