title: The constraints doesn't work as I expected
body: <p>I have two views like this:</p>
  
  <p><img src="https://i.stack.imgur.com/L1WSJ.png" alt="enter image description here"></p>
  
  <p>I setup the vertical space constraints:</p>
  
  <p><img src="https://i.stack.imgur.com/e0b7h.png" alt="enter image description here"></p>
  
  <p>As you see, the constraint between BottomView's top and TopView's bottom is 0. But unfortunately it's not true when I click the <strong>Toggle</strong> button to move the Top View. Here is the code:</p>
  
  <pre><code>@IBAction func onToggle(sender: AnyObject) {
  
      self.topView.transform = CGAffineTransformMakeTranslation(0, -self.topView.bounds.height)
  }
  </code></pre>
  
  <p>It's the same even if I add :</p>
  
  <pre><code>    self.view.setNeedsUpdateConstraints()
      self.view.setNeedsLayout()
  </code></pre>
  
  <p>The result is:</p>
  
  <p><img src="https://i.stack.imgur.com/afBvl.png" alt="enter image description here"></p>
  
  <p>Apparently the margin between the TopView's bottom and BottomView's top is not 0. The auto layout doesn't work. Did I miss anything? Thanks</p>
  
  <p><strong>P.S.</strong>: I know there is another way to solve this issue. For example, to change the frame of the BottomView when the toggle is pressed. But my question is why the autolayout doesn't work as I expect?</p>