title: Changing NSLayoutContraint constant in viewDidLoad or viewWillAppear don't works
body: <p>I am trying to do something like this:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      NSLog(@"%@", self.tableViewHeight);
      self.tableViewHeight.constant = 0;
      NSLog(@"%@", self.tableViewHeight);
  
      [self.tableView setNeedsUpdateConstraints];
      [self.tableView setNeedsLayout];
      [self.view setNeedsUpdateConstraints];
      [self.view setNeedsLayout];
  }
  </code></pre>
  
  <p>But sometimes this work and sometimes not. I always see right messages in log:</p>
  
  <pre><code>&lt;NSLayoutConstraint:0x9ebe7a0 V:[UITableView:0xa345a00(304@500)] priority:500&gt;
  &lt;NSLayoutConstraint:0x9ebe7a0 V:[UITableView:0xa345a00(0@500)] priority:500&gt;
  </code></pre>
  
  <p>Why this happens? How to change NSLayoutConstraints properties before UI became visible?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>This code works 20 times of 20 times (but I think now always):</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      dispatch_async(dispatch_get_main_queue(), ^{
          self.tableViewHeight.constant = 0;
          [self.view setNeedsUpdateConstraints];
      });
  }
  </code></pre>
  
  <p>Just tell me why this happens really?</p>
  
  <p><strong>UPDATE 2:</strong></p>
  
  <p>Looks like previous code still not working but this works:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      self.topViewHeight.constant += self.tableViewHeight.constant;
      self.tableViewHeight.constant = 0;
      [self.view setNeedsUpdateConstraints];
  }
  </code></pre>
  
  <p><strong>UPDATE 3:</strong></p>
  
  <p>I WILL NEVER SET EQUAL PRIORITIES (LIKE 500) TO SEVERAL CONSTRAINTS WITH CONNECTED VIEWS...</p>