在翻转时,父视图逐渐变为黑色(从白色)到动画的中间,然后再次变为白色...为什么?
我的代码:
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(带:但是我还有另外一个问题:圆角正在消失。
这一天苦苦挣扎...我的意思是所有的代码。
答案 0 :(得分:2)
尝试将BaseView Color设置为UIColor.clear
UIColor.white