Skip to content

Instantly share code, notes, and snippets.

@dejanskledar
Created December 20, 2017 08:12
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 dejanskledar/af6064b41c4624d05a23e651ad7cb0b7 to your computer and use it in GitHub Desktop.
Save dejanskledar/af6064b41c4624d05a23e651ad7cb0b7 to your computer and use it in GitHub Desktop.
UIView.animate(withDuration: 1, animations: {
view.frame.origin.x += 200
}, completion: { _ in
UIView.animate(withDuration: 1, animations: {
view.backgroundColor = .green
}, completion: { _ in
UIView.animate(withDuration: 1, animations: {
view.frame.origin.y += 200
}, completion: { _ in
UIView.animate(withDuration: 1, animations: {
view.transform = CGAffineTransform.identity.scaledBy(x: 2, y: 2)
}, completion: { _ in
UIView.animate(withDuration: 1, animations: {
view.alpha = 0
}, completion: { _ in
print("I'm done!")
})
})
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment