3
我使用UIView.transition方法在2個視圖之間翻轉,但在此之後,兩個視圖的框架都被更改了。UIView的框架在翻轉後被更改
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
}
})
}
我的錯誤是什麼?感謝您的幫助。
感謝名單@maddy與所述語法:) –