title: How to Update Label With Downloading Data
body: <p>In my model, data is downloaded from website in a for loop and in a each turn data is sending to my viewController using protocol method. In model file;</p>
  
  <pre><code>    for(NSString* data in DataArray){
  
          [self.delegate passUpdatingCourse:data_name];
  
   //other operations
  }
  </code></pre>
  
  <p>In my viewController data name coming from model is saving to NSArray property in other thread;</p>
  
  <pre><code>    ModelClass *modelObject = [[ModelClass alloc]  init];
      [modelObject setDelegate:self];
  
      dispatch_queue_t otherQ = dispatch_queue_create("Q", NULL);
  
      dispatch_async(otherQ, ^{
  
          //other operations
  
          [self performSelectorOnMainThread:@selector(passUpdatingCourse:) withObject:nil waitUntilDone:YES];
  
  
          dispatch_async(dispatch_get_main_queue(), ^{
  
              [self.myIndicator stopAnimating];
              self.indicatorText.hidden = YES;
              [self.changingCourseLabel setNeedsDisplay];
  
          });
  
  
      });
  </code></pre>
  
  <p>And also data coming via protocol method is setting viewController label;</p>
  
  <pre><code>-(void)passUpdatingCourse:(NSString *)data_in{
  
      self.myLabel.text = data_in;
  
  }
  </code></pre>
  
  <p>When each data came, myLabel in a viewController must be update. But it is not happens. In a protocol method when I use this;</p>
  
  <pre><code>NSLog(@"Data:%@",self.myLabel.text);
  </code></pre>
  
  <p>Yeah it shows data in a console but myLabel in a view is not changing.</p>
  
  <p>I searched questions like that but couldn't find a solution.</p>