Created
February 26, 2020 01:25
-
-
Save ozgurshn/0c08c175ce95d6193584f1a18358f73f to your computer and use it in GitHub Desktop.
UIimageview transition animation
This file contains hidden or 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
| //https://stackoverflow.com/questions/7638831/fade-dissolve-when-changing-uiimageviews-image/38350024#38350024 | |
| let toImage = UIImage(named:"myname.png") | |
| UIView.transition(with: self.imageView, | |
| duration: 0.3, | |
| options: .transitionCrossDissolve, | |
| animations: { | |
| self.imageView.image = toImage | |
| }, | |
| completion: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment