         // Rather than duration = 0 when not animated, spare extra layout.
         if animated {
             UIView.animate(withDuration: 0.35, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: .beginFromCurrentState, animations: {
-                self.paletteContainer.transform = .identity
+                self.paletteContainer.transform = paletteTransformAtEnd
                 self.view.layoutIfNeeded()
             }, completion: completion)
         } else {

    /// If `animated` is `true`, will also reflow the content of the selected
    /// view controller.
    func setPaletteViewController(_ newValue: UIViewController?, animated: Bool) {
        let completion: (Bool) -> Void

        let oldValue = paletteViewController

        guard isViewLoaded else { return }

        newValue.beginAppearanceTransition(true, animated: animated)
        defer { newValue.endAppearanceTransition() }

        UIView.performWithoutAnimation {
            self.installView(of: newValue)
        }
    }

    private func startUninstalling(_ oldValue: UIViewController, animated: Bool) {
        let isLive = viewIfLoaded?.window != nil
        if isLive {
            oldValue.beginAppearanceTransition(false, animated: animated)
        }

        oldValue.willMove(toParentViewController: nil)

        if isLive {
            oldValue.endAppearanceTransition()
        }
    }

    private func finishUninstalling(_ oldValue: UIViewController) {
        assert(isViewLoaded)

        oldValue.view.removeFromSuperview()

        palettePreferredHeight.constant = 0
        updateHighlightingSupport(for: nil)
