title: Animating constraints is breaking other constraints
body: <p>I have the following tableview at the bottom of my view</p>
  
  <p><img src="https://i.stack.imgur.com/CKCNm.png" alt="enter image description here"></p>
  
  <p>It has a height constraint (priority 250) and a constraint to the bottom of the view (priority 1000). The height constraint points to a `IBOutlet in my view controller.</p>
  
  <p>I want to change the height of the table view from 44.0f to 7*44.0f, so what I am doing is this;</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (self.categoriesShown) {
          [self hideCategories];
      } else {
          [self showCategories];
      }
  
      self.categoriesShown = !self.categoriesShown;
  }
  
  - (void)showCategories
  {
      self.categoriesHeightConstraint.constant = self.categories.count * 44.0f;
  }
  
  - (void)hideCategories
  {
      self.categoriesHeightConstraint.constant = 44.0f;
  }
  </code></pre>
  
  <p>It works fine. But when I'm trying to animating all this with the following code:</p>
  
  <pre><code>- (void)showCategories
  {
      [self.categoryTableView layoutIfNeeded];
  
      [UIView transitionWithView:self.categoryTableView duration:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
  
          self.categoriesHeightConstraint.constant = self.categories.count * 44.0f;
          [self.categoryTableView layoutIfNeeded];
  
      } completion:nil];
  }
  
  - (void)hideCategories
  {
      [self.categoryTableView layoutIfNeeded];
  
      [UIView transitionWithView:self.categoryTableView duration:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
  
          self.categoriesHeightConstraint.constant = 44.0f;
          [self.categoryTableView layoutIfNeeded];
  
      } completion:nil];
  }
  </code></pre>
  
  <p>Then the constraints between the tableview and the bottom of the view is somehow broken and this is what I get when I show and then hide the tableview</p>
  
  <p><img src="https://i.stack.imgur.com/7ddav.png" alt="enter image description here"></p>
  
  <p><strong>Does anyone know why, the constraint is broken but only when I try to animate the changes?</strong></p>
  
  Update: UIButton Constraints
  
  <p>Both buttons have width and height constraints as well a a constraint to the bottom of the view. The button on the left has a leading constraint to the view. The one of the right has a trailing constraint to the view. The also both have a horizontal spacing constraint to the table view as mentioned above.</p>
  
  <p><img src="https://i.stack.imgur.com/TvgCC.png" alt="enter image description here"></p>