-
-
Save tbatsuur/ac5847babbb936ca3d3bb2004d4a27fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func moveGreen() { | |
let animationTime = 2.0 | |
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 1.0) { | |
UIView.animate(withDuration: animationTime, delay: 0.0, options: [.autoreverse, .repeat], animations: { | |
self.greenView.backgroundColor = UIColor.yellow | |
}, completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment