         // always active constraints
         let trailingConstraint = viewController.view.trailingAnchor.constraint(equalTo: containerView.trailingAnchor)
         let bottomConstraint = viewController.view.bottomAnchor.constraint(equalTo: containerView.bottomAnchor)
-        bottomConstraint.priority = .defaultHigh // prevents autolayout complaint when container view is dragged beneath the keyboard
         let leadingConstraint = viewController.view.leadingAnchor.constraint(equalTo: containerView.leadingAnchor)
         NSLayoutConstraint.activate([trailingConstraint, bottomConstraint, leadingConstraint])
         

        }
    }
    
    private func toggleConstraints(shouldPinToTop: Bool) {
        if shouldPinToTop {
            containerViewHeightConstraint?.isActive = false

            let containerViewSafeAreaFrame = viewController.view.convert(containerView.frame, to: safeAreaBackgroundView)
            let containerViewYUponDragBegin = containerViewSafeAreaFrame.origin.y
            self.containerViewYUponDragBegin = containerViewYUponDragBegin
            
            self.containerViewWasPinnedToTopUponDragBegin = containerViewYUponDragBegin == containerPinnedTopSpacing
            
            calculateTopConstraintUponDrag(translationY: translationY)
            toggleConstraints(shouldPinToTop: true)
        case .changed:
            
            guard containerViewYUponDragBegin != nil else {
                gestureRecognizer.state = .ended
                return
            }
            
            calculateTopConstraintUponDrag(translationY: translationY)
            toggleConstraints(shouldPinToTop: true)
        case .ended:

