     private let roundedViewForPresentedView = RoundedView()
     
 	private var cachedContainerWidth: CGFloat = 0
-    private var snapshotViewHeightConstraint: NSLayoutConstraint?
+    private var snapshotViewTopConstraint: NSLayoutConstraint?
+    private var snapshotViewWidthConstraint: NSLayoutConstraint?
 	private var snapshotViewAspectRatioConstraint: NSLayoutConstraint?
     
     private var presentedViewFrameObserver: NSKeyValueObservation?

		
		cachedContainerWidth = containerView.bounds.width
        
        snapshotViewHeightConstraint?.isActive = false
		snapshotViewAspectRatioConstraint?.isActive = false
        
        let heightConstant = ManualLayout.presentingViewTopInset * 2
		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)
		
        snapshotViewHeightConstraint?.isActive = true
        snapshotViewAspectRatioConstraint?.isActive = true
	}
	

        roundedViewForPresentingView.frame = initialFrame
        roundedViewForPresentingView.transform = CGAffineTransform(scaleX: scale, y: scale)
        
        snapshotViewTopConstraint?.isActive = false
        snapshotViewWidthConstraint?.isActive = false
        snapshotViewAspectRatioConstraint?.isActive = false
        presentingViewSnapshotView.translatesAutoresizingMaskIntoConstraints = true
        presentingViewSnapshotView.frame = initialFrame
