-
-
Save tbatsuur/a17ac544d291e4b1ad48802880ee370c 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 moveBlue() { | |
let animationTime = 2.0 | |
let newView = UIView(frame: self.blueView.frame) | |
newView.backgroundColor = UIColor.purple | |
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 1.0) { | |
UIView.transition(from: self.blueView, to: newView, duration: animationTime, options: [.transitionFlipFromLeft, .repeat, .autoreverse], completion: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment