title: Using UIView.transition(from, to) with autoLayout constraints
body: <p>I am trying to show a card and flip that card on tap. </p>
  
  <p>For this I have a UIView which acts as a container view for two separate UIViews (frontView, backView). I have attached a tapGestureRecognizer to the container view and am calling the function below. </p>
  
  <pre><code>@objc func flipCard() {
      print("Flipping card")
  
      if showingBack == true {
          UIView.transition(from: backView, to: frontView, duration: 0.3, options: .transitionFlipFromLeft, completion: nil)
          showingBack = false
      } else {
          UIView.transition(from: frontView, to: backView, duration: 0.3, options: .transitionFlipFromRight, completion: nil)
          showingBack = true
      }
  }
  </code></pre>
  
  <p>The first flip works, flipping back doesn't work - the card simply disappears. I was able to figure out that as soon as I set AutoresizingMaskIntoConstraints to true for those two sub views, the flipping works just fine, like this: </p>
  
  <pre><code>@objc func flipCard() {
      print("Flipping card")
      frontView.translatesAutoresizingMaskIntoConstraints = true
      backView.translatesAutoresizingMaskIntoConstraints = true
  
      if showingBack == true {
          UIView.transition(from: backView, to: frontView, duration: 0.3, options: .transitionFlipFromLeft, completion: nil)
          showingBack = false
      } else {
          UIView.transition(from: frontView, to: backView, duration: 0.3, options: .transitionFlipFromRight, completion: nil)
          showingBack = true
      }
  }
  </code></pre>
  
  <p>However, setting the AutoresizingMaskIntoConstraints to true causes a few UI collisions in my view which is why I'd like to avoid that. I'm grateful for tips how I can work around this. And can someone explain why exactly this is happening in the first place? </p>
  
  <p>Much appreciated!</p>