Skip to content

Instantly share code, notes, and snippets.

@agammahajan1
Created December 29, 2019 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agammahajan1/ffa7a7a0c7a65c1e2e46a078d2aab485 to your computer and use it in GitHub Desktop.
Save agammahajan1/ffa7a7a0c7a65c1e2e46a078d2aab485 to your computer and use it in GitHub Desktop.
let image_1 = UIImage(named: "image-1")!
let image_2 = UIImage(named: "image-2")!
let image_3 = UIImage(named: "image-3")!
let images = [image_1, image_2, image_3]
let animatedImage = UIImage.animatedImage(with: images, duration: 2.0)
imageView.image = animatedImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment