title: Why UIPresentationController's height is changed when present another controller?
body: <p>I use <code>UIPresentationController</code> to show bottom tip. Sometimes the <code>presentationController</code> may present another controller. And When the presented controller is dismissed, the presentationController's height was changed. So why does it changed and how can i solve this problem. The code likes below:</p>
  
  <pre><code>class ViewController: UIViewController {
  
      let presentVC = UIViewController()
      override func viewDidLoad() {
          super.viewDidLoad()
          DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
              guard let `self` = self else { return }
              self.presentBottom(self.presentVC)
          }
  
          DispatchQueue.main.asyncAfter(deadline: .now() + 2) { [weak self] in
              guard let `self` = self else { return }
              let VC = UIViewController()
              VC.view.backgroundColor = .red
              self.presentVC.present(VC, animated: true, completion: {
  
                  DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
                      VC.dismiss(animated: true, completion: nil)
                  }
  
              })
          }
      }
  
  }
  </code></pre>
  
  <pre><code>public class PresentBottom: UIPresentationController {
  
      public override var frameOfPresentedViewInContainerView: CGRect {
          let bottomViewHeight: CGFloat = 200.0
          let screenBounds              = UIScreen.main.bounds
          return CGRect(x: 0, y: screenBounds.height - bottomViewHeight, width: screenBounds.width, height: bottomViewHeight)
      }
  
  }
  </code></pre>
  
  <pre><code>extension UIViewController: UIViewControllerTransitioningDelegate {
  
      public func presentBottom(_ vc: UIViewController ) {
          vc.view.backgroundColor = .purple
          vc.modalPresentationStyle = .custom
          vc.transitioningDelegate = self
          self.present(vc, animated: true, completion: nil)
      }
  
      public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -&gt; UIPresentationController? {
          let vc = PresentBottom(presentedViewController: presented, presenting: presenting)
          return vc
      }
  }
  </code></pre>
  
  <p>My codes like below:
  <a href="https://i.stack.imgur.com/691M1.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/691M1.jpg" alt="enter image description here"></a></p>
  
  <p>The <code>presentationController</code> height is right in the below image:</p>
  
  <p><a href="https://i.stack.imgur.com/41vFU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/41vFU.png" alt="enter image description here"></a></p>
  
  <p>What confused me is that the present view controller's height is changed:</p>
  
  <p><a href="https://i.stack.imgur.com/KEkGx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KEkGx.png" alt="enter image description here"></a></p>