How do I set the UIViewAnimationOptions
to .Repeat
in an UIView
animation block:
UIView.animateWithDuration(0.2, delay:0.2
Pretty much the same as before:
UIView.animate(withDuration: 0.2, delay: 0.2, options: UIViewAnimationOptions.repeat, animations: {}, completion: nil)
except that you can leave out the full type:
UIView.animate(withDuration: 0.2, delay: 0.2, options: .repeat, animations: {}, completion: nil)
and you can still combine options:
UIView.animate(withDuration: 0.2, delay: 0.2, options: [.repeat, .curveEaseInOut], animations: {}, completion: nil)
UIView.animateWithDuration(0.2, delay: 0.2, options: UIViewAnimationOptions.Repeat, animations: {}, completion: nil)
UIView.animateWithDuration(0.2, delay: 0.2, options: .Repeat, animations: {}, completion: nil)
UIView.animateWithDuration(0.2, delay: 0.2, options: [.Repeat, .CurveEaseInOut], animations: {}, completion: nil)