Skip to content

Instantly share code, notes, and snippets.

@licvido
Created February 3, 2015 23:18
Show Gist options
  • Save licvido/bc22343cacfa3a8ccf88 to your computer and use it in GitHub Desktop.
Save licvido/bc22343cacfa3a8ccf88 to your computer and use it in GitHub Desktop.
SWIFT: Fade when changing UIImageView's image
let toImage = UIImage(named:"image.png")
UIView.transitionWithView(self.imageView,
duration:5,
options: .TransitionCrossDissolve,
animations: { self.imageView.image = toImage },
completion: nil)
@decodeveronikaa
Copy link

Thanks, it works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment