title: iOS - UIProgressView only updating once
body: <p>I am loading data from an API and am using a UIProgressView to display how much has loaded. </p>
  
  <p>In my viewWillAppear I use Reachability to check that there is an internet connection. Then, if there is, the following line is called 10 times in a function.</p>
  
  <pre><code>[self performSelectorInBackground:@selector(updateProgress) withObject:nil];
  </code></pre>
  
  <p>This then runs this method</p>
  
  <pre><code>-(void)updateProgress {
      float currentProgress = myProgressBar.progress;
      NSLog(@"%0.2f", currentProgress);
      [loadingProg setProgress:currentProgress+0.1 animated:YES];
  }
  </code></pre>
  
  <p>The float increments by 0.1 and the loading view displays this.</p>
  
  <p>When the view is dismissed (it is a modal view) and then recalled, the method runs and the NSLog shows that the currentProgress is incrementing as it should. However, the progress bar remains empty. Does anyone know what could cause this?</p>
  
  <p>For reference, I am using ARC.</p>
  
  <p>Update:</p>
  
  <p>This is how I am calling the API</p>
  
  <pre><code>NSString *urlString = **url**;
  NSURL *JSONURL = [NSURL URLWithString:urlString];
  NSURLRequest *request = [NSURLRequest requestWithURL:JSONURL
                          cachePolicy:NSURLRequestReloadIgnoringCacheData 
                          timeoutInterval:10];
  if(connectionInProgress) {
      [connectionInProgress cancel];
  }
  connectionInProgress = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
  
  //This is where I call the update to the progress view
  </code></pre>
  
  <p>And I have these functions:</p>
  
  <pre><code>- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
  {
      JSONData = [NSMutableData data];
      [JSONData setLength:0];
  }
  
   - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
  {
      [JSONData appendData:data];
  }
  
  -(void) connectionDidFinishLoading:(NSURLConnection *)connection
  {
      //add data to mutable array and other things
  }
  </code></pre>