【发布时间】:2017-07-30 00:06:32
【问题描述】:
我想多次翻转UIButton 上的图像。即旋转门式动画。我不在乎它是否翻转了一定次数或一段时间
现在我可以翻转一次,使用以下代码:
UIView.transition(with: thisButton, duration: 0.2, options: .transitionFlipFromTop, animations: {
thisButton.setImage(myButtonImage, for: .normal)
}, completion: nil)
【问题讨论】:
-
你也可以设置重复次数来控制它!
标签: ios swift animation uiview transition