Skip to content

Instantly share code, notes, and snippets.

@hfossli
Created September 20, 2016 07:05
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 hfossli/17faf5619d1db19bfc48ecedf38ccb6a to your computer and use it in GitHub Desktop.
Save hfossli/17faf5619d1db19bfc48ecedf38ccb6a to your computer and use it in GitHub Desktop.
Example
CATransaction.begin()
CATransaction.setCompletionBlock({
// Every animation added to this transaction is now finished
})
UIView.animateWithDuration(0.5, delay: 0.5, options: [], animations: {
view1.alpha = 1.0
}, completion: { finished in
self.addSeveralLayerAnimations()
})
CATransaction.commit()
/*
What I would like to say now:
*/
let animations = CATransaction.animations // layer and animation keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment