title: Reload table after alert Swift
body: <p>I'm trying to reload my tableView after an object is deleted from Parse.
  I try <code>self.tableView.reloadData()</code> in my completion handler and even get a <code>print</code> statement that tells me when it's done but my table doesn't reload.</p>
  
  <pre><code>@IBAction func trashButtonPressed(sender: UIButton) {
          print("Button pressed")
  
          let alertController = UIAlertController(title: "Alert", message: "Do you want to delete all recent games?", preferredStyle: .Alert)
  
          let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (action) in
  
          }
  
          let OKAction = UIAlertAction(title: "OK", style: .Default) { (action) in
  
              for game in self.games[3] {
                  game.deleteInBackgroundWithBlock({ (success, error) -&gt; Void in
                      if error == nil {
  
                          self.tableView.reloadData()
  
                          print("Did delete game? \(success)")
                      }
                  })
              }
          }
  
          alertController.addAction(cancelAction)
          alertController.addAction(OKAction)
  
          presentViewController(alertController, animated: true, completion: { () -&gt; Void in
              print("Alert was shown")
          })
  
      }
  </code></pre>
  
  <p><strong>What am I doing wrong?  Where should I put <code>self.tableView.reloadData()</code>?</strong></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried to get the main queue like so:</p>
  
  <pre><code>  game.deleteInBackgroundWithBlock({ (success, error) -&gt; Void in
                  if error == nil {
  
                      dispatch_async(dispatch_get_main_queue(), { () -&gt; Void in
  
                          self.tableView.reloadData()
                      })
  
                      print("Did delete game? \(success)")
                  } else {
  
                      print("Error: \(error)")
                  }
              })
  </code></pre>
  
  <p>The table still did not reload when I pressed <code>OK</code></p>