title: Nested view not obeying constraint on rotating parent (transform)
body: <p>I have video view (parent) and a nested view with controls (fullscreen button)</p>
  
  <p>I basically am trying to make a fullscreen button where the view rotates and becomes full screen. The parent view does this without any problems, but the child view is not obeying the constraints. 
  It rotates with the parent but the widths and position do not accommodate the transform.</p>
  
  <p>The child view needs to be pinned to leading + trailing + bottom. With a fixed height. </p>
  
  <p>The parent view is also contained within a containing view. </p>
  
  <p>(The videoView is the parent view)</p>
  
  <pre><code>UIView.animate(withDuration: 0.6, animations: {
  
              //Set the default frames ready to restore..
              self.videoViewFrame = self.videoView.frame
              self.videoViewButtonFrame = self.videoButtonView.frame
  
  
              self.navigationController?.navigationBar.layer.zPosition = -1
              self.navigationController?.setNavigationBarHidden(true, animated: true)
  
              self.tabBarController?.tabBar.layer.zPosition = -1
              self.tabBarController?.tabBar.isHidden = true
  
  
              self.videoView.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI / 2))
  
              self.videoView.frame = UIScreen.main.bounds
  
              UIApplication.shared.keyWindow?.windowLevel = UIWindowLevelStatusBar
          }
  </code></pre>
  
  <p>I have tried different constraint settings. </p>
  
  <ul>
  <li>Setting the Leading, trailing and bottom</li>
  <li>Setting the equal widths and centre within the videoView parent</li>
  </ul>
  
  <p>The child view rotates with the parent, but not constrained to the bottom, left, right as needed.</p>
  
  <p>Here is the cropped smaller view within the controller (portrait)</p>
  
  <p><a href="https://i.stack.imgur.com/F82NR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F82NR.png" alt=""></a></p>
  
  <p>Here is the fullscreen, with the controls not pinned as needed
  <a href="https://i.stack.imgur.com/dgW2E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dgW2E.png" alt="enter image description here"></a></p>
  
  <p>If i log the constraints of the child view, the constraints are still there after the animation. There is no errors within the log either
  But if i try to change the frame of the child view, it won't let me.
  It seems the constraints are stuck at the position before the transform takes place?
  setNeedsLayout or setNeedsUpdateConstraints doesn't change anything</p>