title: IOS 8 progress bar delay to update while downloading (swift)
body: <p>I did create an app which the user can download some assets.
  I am using the NSURLSession to download and track the progress with the UIProgressView.</p>
  
  <p>Folow my code:</p>
  
  <pre><code>func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
  
      var progress = ("\(((totalBytesWritten * 100) / totalBytesExpectedToWrite))" as NSString).floatValue / 100
  
      println("progress: \(progress)")
  
      progressBar.setProgress(progress, animated: true)
      progressLabel.text = "\(progresso)"     
  }
  </code></pre>
  
  <p>With this code I can see in the console the values from 0.0 to 1.0
  But my progress bar view only updates at 0.0, 0.4, 0.9 , 1.0. Or some thing like that.</p>