 	
 	// MARK:- Presented view KVO + Rounded view update methods
 	
-	override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
-		if keyPath == "transform" || keyPath == "frame", let view = object as? UIView {
-			let offset = view.frame.origin.y
-			updateRoundedView(forOffset: offset)
-		}
-	}
-	
-	private func updateRoundedView(forOffset offset: CGFloat) {
+    private func setupPresentedViewKVO() {
+        presentedViewFrameObserver = presentedViewController.view.observe(\.frame, options: [.initial]) { [weak self] _, _ in
+            self?.presentedViewWasUpdated()
+        }
+        
+        presentedViewTransformObserver = presentedViewController.view.observe(\.transform, options: [.initial]) { [weak self] _, _ in
+            self?.presentedViewWasUpdated()
+        }
+    }
+    
+    private func invalidatePresentedViewKVO() {
+        presentedViewFrameObserver = nil
+        presentedViewTransformObserver = nil
+    }
+    
+    private func presentedViewWasUpdated() {
+        let offset = presentedViewController.view.frame.origin.y
 		roundedViewForPresentedView.frame = CGRect(x: 0, y: offset, width: containerView!.bounds.width, height: Constants.cornerRadius)
 	}
 	

        
        roundedViewForPresentedView.translatesAutoresizingMaskIntoConstraints = false
        containerView.addSubview(roundedViewForPresentedView)
        presentedViewController.view.addObserver(self, forKeyPath: "frame", options: [.initial], context: nil)
        presentedViewController.view.addObserver(self, forKeyPath: "transform", options: [.initial], context: nil)
        
        containerView.insertSubview(presentingViewSnapshotView, belowSubview: presentedViewController.view)
        presentingViewSnapshotView.frame = containerView.bounds

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