Previously in swift you could do this:
let animator = UIViewPropertyAnimator(duration: 0.25, curve: .easeIn) {
UIView.setAnimationRepeatCount(Float.infinity)
UIView.setAnimationRepeatAutoreverses(true)
let transform = CATransform3DIdentity
let rotate = CATransform3DRotate(transform, 45, 1, 1, 0)
self.ex.layer.transform = rotate
}
However, now there is a deprecation message on UIView.setAnimationRepeatCount
and UIView.setAnimationRepeatAutoreverses
. Does anybody know what they was replaced with? Am I still able to use UIViewPropertyAnimator
, or do I have to go to something like CABasicAnimation
?
Messages are:
'setAnimationRepeatCount' was deprecated in iOS 13.0: Use the block-based animation API instead
'setAnimationRepeatAutoreverses' was deprecated in iOS 13.0: Use the block-based animation API instead