title: How to reload tableview's data after JSON data has downloaded
body: <p>I call the <code>getPrizesData</code> in <code>func viewDidLoad()</code> </p>
  
  <p>I call <code>reload</code> after finishing download the JSON data.</p>
  
  <p>But it didn't refresh my cells in the tableview,</p>
  
  <p>How to fix it ? Thanks</p>
  
  <pre><code>@IBOutlet var invoice: UITableView!
  
  func getPrizesData()-&gt; Void{
      let url = NSURL(string: "http://localhost:3002/invoices.json")
      let sharedSession = NSURLSession.sharedSession()
      let downloadTask: NSURLSessionDownloadTask =
      sharedSession.downloadTaskWithURL(url,
          completionHandler: {(location: NSURL!, response: NSURLResponse!, error: NSError!)-&gt;Void in
              if (error == nil){
                  let dataObject = NSData(contentsOfURL: location)
                  if let prizes = NSJSONSerialization.JSONObjectWithData(dataObject, options: .MutableLeaves, error: nil) as? NSArray {
                      let prizesDictionary = prizes[0] as NSDictionary
                      let toPrizesArray = prizesDictionary["to_prizes"] as NSArray
                      self.items = toPrizesArray as [AnyObject] as [String]
                      self.invoice.reloadData()
                  }
                  else {
                      println("error")
                  }
              }else{
  
                  println(error)
              }
  
      })
      downloadTask.resume()
  }
  </code></pre>