Whats the Swift animate WithDuration syntax?

Swift 3/4 Syntax Here’s an update with the Swift 3 Syntax: UIView.animate(withDuration: 0.5, delay: 0.3, options: [.repeat, .curveEaseOut, .autoreverse], animations: { self.username.center.x += self.view.bounds.width }, completion: nil) If you need to add a completion handler just add a closure like so: UIView.animate(withDuration: 0.5, delay: 0.3, options: [.repeat, .curveEaseOut, .autoreverse], animations: { // animation stuff }, … Read more