         presentedViewController.view.frame = offscreenFrame
         presentedViewController.view.transform = .identity
         
-        presentedViewController.view.removeObserver(self, forKeyPath: "frame")
-        presentedViewController.view.removeObserver(self, forKeyPath: "transform")
+        invalidatePresentedViewKVO()
 		
 		dismissCompletion?(completed)
 	}

	private var cachedContainerWidth: CGFloat = 0
    private var snapshotViewHeightConstraint: NSLayoutConstraint?
	private var snapshotViewAspectRatioConstraint: NSLayoutConstraint?
	
	private var presentAnimation: (() -> ())? = nil
	private var presentCompletion: ((Bool) -> ())? = nil

		snapshotViewAspectRatioConstraint?.isActive = false
        
        let heightConstant = ManualLayout.presentingViewTopInset * 2
        print(roundedViewForPresentingView.cornerRadius)
		let aspectRatio = containerView.bounds.width / containerView.bounds.height
        
        roundedViewForPresentingView.cornerRadius = Constants.cornerRadius * (1 - (heightConstant / containerView.frame.height))
        snapshotViewHeightConstraint = presentingViewSnapshotView.heightAnchor.constraint(equalTo: containerView.heightAnchor,constant: -heightConstant)
        snapshotViewAspectRatioConstraint = presentingViewSnapshotView.widthAnchor.constraint(equalTo: presentingViewSnapshotView.heightAnchor, multiplier: aspectRatio)
		
