with the UIView.animate: method , we can configure the options and make it [.autoreverse,.repeat]. here is a simple Animation:
@IBOutlet weak var v1: UIView!
UIView.animate(withDuration: 3, delay: 0, options: [.autoreverse,.repeat], animations: {
self.v1.frame = self.v1.frame.offsetBy(dx: 100, dy: 0)
}, completion: nil)
this code will animate the v1 moving it forward and back repeatedly, how can I do it with UIViewPropertyAnimator?(I want to the the advantage of stop and pause)