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与所述语法:) –