title: Why view isn't updating even on my thread?
body: <p>I'm trying to realised why view isn't updating when some value is set. Problem looks as trivial one but I spent a lot of time to find the problem - with no results. </p>
  
  <ul>
  <li>When last value from the block is returned view is updated to this last reported progress value.</li>
  <li>setting value on slider is on main thread - nothing changes after execute change in <code>dispatch_async()</code> on main thread.</li>
  </ul>
  
  <p>Here is whole code:</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      [self performSelector:@selector(doUpdate) withObject:nil afterDelay:5.0f];
  }
  
  
  - (void)doUpdate {
      __weak typeof(self.slider) weakSlider = self.slider;
      [self doSomethingAndReportProgress:^(CGFloat progress) {
          NSLog(@"3. reported progress: %f", progress);
          weakSlider.value = progress; /// slider has range 0 - 100
          NSLog(@"4. weakSlider.value: %f", weakSlider.value);
      }];
  }
  
  - (void)doSomethingAndReportProgress:(void(^)(CGFloat))block {
      [self doSomethingOtherAndReportProgress:^(CGFloat progress) {
          block(progress);
          NSLog(@"2. reported progress: %f", progress);
      }];
  }
  
  - (void)doSomethingOtherAndReportProgress:(void(^)(CGFloat))block {
      for (int i = 0; i &lt; 10000; i++) {
          CGFloat progress = i / 100.0;
          block(progress);
          NSLog(@"1. reported progress: %f", progress);
      }
  }
  
  @end
  </code></pre>
  
  <p>Scrap of logs from console:</p>
  
  <pre><code>2014-04-23 09:48:03.991 UIUpdateInBlock[87087:60b] 3. reported progress: 2.050000
  2014-04-23 09:48:03.991 UIUpdateInBlock[87087:60b] 4. weakSlider.value: 2.050000
  2014-04-23 09:48:03.991 UIUpdateInBlock[87087:60b] 2. reported progress: 2.050000
  2014-04-23 09:48:03.992 UIUpdateInBlock[87087:60b] 1. reported progress: 2.050000
  ....
  2014-04-23 09:48:04.421 UIUpdateInBlock[87087:60b] 3. reported progress: 3.950000
  2014-04-23 09:48:04.422 UIUpdateInBlock[87087:60b] 4. weakSlider.value: 3.950000
  2014-04-23 09:48:04.423 UIUpdateInBlock[87087:60b] 2. reported progress: 3.950000
  2014-04-23 09:48:04.423 UIUpdateInBlock[87087:60b] 1. reported progress: 3.950000
  ....
  </code></pre>
  
  <p>And why logs are in the order: 3, 4, 2 ,1 instead of 1, 2, 3, 4?</p>
  
  <p>Thank you in advance.</p>