Extension
This extension adds a handy function for turning off implicit CATransaction behaviour.
extension CATransaction
When working with animatable layers, it is sometimes very useful to suppress the implicit 0.25s
animation behaviour that comes default in Core Animation.
static func suppressAnimations(actions: () -> Void) {
begin()
setAnimationDuration(0)
actions()
commit()
}
To use this, simply do the following:
CATransaction.suppressAnimations {
//... all the stuff you want to not animate.
}
result(s) found for “”.