我使用了UIView.transition方法来翻转两个视图,但是在此之后,两个视图的框架都被改变了。
我的问题出在哪里?感谢您的帮助。
if isFront {
UIView.transition(from: frontView, to: behindView, duration: 0.5, options: .transitionFlipFromRight,completion: { (finished) in
if finished {
self.isFront = false
}
})
} else {
UIView .transition(from: behindView, to: frontView, duration: 0.5, options: .transitionFlipFromLeft, completion: { (finished) in
if finished {
self.isFront = true
}
})
}
我的问题出在哪里?感谢您的帮助。
![image](https://istack.dev59.com/ISwGS.gif)