title: Autolayout during animation
body: <p>I put a button in the corner of a sub view in the UIViewController. Now what I want is when the sub view increase its height, the button should be still at the corner. In the design I use autolayout as follow:</p>
  
  <p><img src="https://i.stack.imgur.com/N3rXh.png" alt="enter image description here"></p>
  
  <ul>
  <li>sub view (left, top, width, height)</li>
  <li>button of the subview (left, bottom, right)</li>
  </ul>
  
  <pre>
  
  [UIView animateWithDuration:0.3 animations:^{
  
          //- Increase the subview's height
          CGRect frame = _subview.frame;
          frame.size.height = frame.size.height + 100;
          _subview.frame = frame;
  
          //- Update constraints
          [_subview layoutIfNeeded];
  }];
  
  
  </pre>
  
  <p>But the button is still the same position. </p>