title: animating the constant in nslayoutconstraint - ambiguous layout
body: <p>This is probably a dumb question, but looking at people's examples, I'd think that animating the NSLayoutConstraint.constant in one direction would be pretty straight forward.  I keep getting ambiguous layout and I'm not sure why.  I have a label that I have these constraints set up for in viewDidLoad.</p>
  
  <pre><code>NSLayoutConstraint *xConstraint = [NSLayoutConstraint constraintWithItem:_locationLabel
                                                                    attribute:NSLayoutAttributeLeading
                                                                    relatedBy:NSLayoutRelationEqual
                                                                       toItem:self.view
                                                                    attribute:NSLayoutAttributeLeading
                                                                   multiplier:1.0
                                                                     constant:20];
  
      [self.view addConstraint:xConstraint];
      NSLayoutConstraint *yConstraint = [NSLayoutConstraint constraintWithItem:_locationLabel
                                                                     attribute:NSLayoutAttributeTop
                                                                     relatedBy:NSLayoutRelationEqual
                                                                        toItem:self.view
                                                                     attribute:NSLayoutAttributeTop
                                                                    multiplier:1.0
                                                                      constant:20];
      [self.view addConstraint:yConstraint];
      self.locationLabelYConstraint = yConstraint;
  </code></pre>
  
  <p>Then I just want to move the label on a tap in the Y direction.  In my gesture recognizer method:</p>
  
  <pre><code>if (_locationLabelYConstraint.constant == 20.0) {
      _locationLabelYConstraint.constant = 30.0;
  } else {
      _locationLabelYConstraint.constant = 20.0;
  }
  [UIView animateWithDuration:3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:10 options:0 animations:^{
      self.isLocationLabelOnScreen = NO;
      [self.view layoutIfNeeded];
  }completion:nil];
  </code></pre>
  
  <p>The label moves as I expect, but I immediately get ambiguous layout to the console. </p>
  
  <pre><code>"&lt;NSIBPrototypingLayoutConstraint:0xc0a73b0 'IB auto generated at build time for view with fixed frame' V:|-(20)-[UILabel:0xc0a4400]   (Names: '|':UIView:0xc0a65b0 )&gt;",
  "&lt;NSLayoutConstraint:0xc0a6d90 V:|-(30)-[UILabel:0xc0a4400]   (Names: '|':UIView:0xc0a65b0 )&gt;"
  </code></pre>
  
  <p>For animating the constant value of nslayoutconstraint, don't I just update the constant value, and call layoutIfNeeded in the animation block?  Thanks. </p>