UIView.transition 显示深色背景的父视图 (Swift)

UIView.transition shows parent view with dark background (Swift)

翻转时,父视图逐渐变为黑色(从白色)到动画中间,然后再次变为白色...为什么?

我的代码:

    if !cardFrontView.isHidden {
        let transitionOptions: UIViewAnimationOptions = [.transitionFlipFromRight, .showHideTransitionViews]
        UIView.transition(from: cardFrontView, to: cardBackView, duration: 1.0, options: transitionOptions, completion: nil)
    }
    else {
        let transitionOptions: UIViewAnimationOptions = [.transitionFlipFromLeft, .showHideTransitionViews]
        UIView.transition(from: cardBackView, to: cardFrontView, duration: 1.0, options: transitionOptions, completion: nil)
    }

我也试过 UIView.transition(with: 但我还有另一个问题:圆角消失了。

整天为此苦苦挣扎...我的意思是这就是所有代码。

尝试将 BaseView 颜色设置为 UIColor.clear 而不是 UIColor.white