title: How do I animate the move a UILabel with auto layout constraints?
body: <p>I'm trying to move a UILabel to the left and animate the movement. The UILabel is created from a storyboard, and has the following constraints:</p>
  
  <p><img src="https://i.stack.imgur.com/1kYVf.png" alt="enter image description here"></p>
  
  <p>But if I try to make the trailing space constant equal to say, 150 instead of 20 to move it to the left, it bounces to the left weirdly for a second then comes back to the middle. So I lowered the priority of the left leading constraint to 900, but the same thing still happened.</p>
  
  <p>So I tried:</p>
  
  <pre><code>self.textToReadLabel.transform = CGAffineTransformMakeTranslation(-500.0, 0.0);
  </code></pre>
  
  <p>Which moves it, but if I use an animation with it it slides off screen, slides back on and then rests in the place it should... after all those theatrics.</p>
  
  <p>How exactly would I achieve this?</p>
  
  <h3>Entirety of what happens when I tap the button to move the label:</h3>
  
  <pre><code>        self.textHorizontalPlacementConstraint.constant = 150.0;
          self.textHorizontalPlacementConstraint2.constant = -110.0;
          [UIView animateWithDuration:1.0 animations:^{
              [self.view layoutIfNeeded];
          }];
  
          CATransition *animation = [CATransition animation];
          animation.duration = 0.5;
          animation.type = kCATransitionFade;
          animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
          [self.textToReadLabel.layer addAnimation:animation forKey:@"changeTextTransition"];
  
          // Change the text
          self.textToReadLabel.text = @"text";
      }
  </code></pre>