Swift: Difference between two CAAnimation Disables

124 views Asked by At

I am currently working with CABasic Animations on CALayers in Swift.

What is the difference between CATransaction.setValue(kCFBooleanTrue, forKey:kCATransactionDisableActions) and CATransaction.setDisableActions(true)?

1

There are 1 answers

0
Ozgur Vatansever On BEST ANSWER

From docs on .setDisableActions:

This is a convenience method that invokes setValue(_:forKey:) with an NSNumber containing a true for the kCATransactionDisableActions key.

So, they basically do the same thing. Former is the KVC-way of doing it.