Calayer implicit animation

My notes on implicit animation

CALayer and implicit animation

The animation was left in intentionally for this test. Animation won’t be apart of Element yet.

Stop implicit animation on a layer in swift:

override func actionForLayer(layer: CALayer, forKey event: String) -> CAAction? {
    return NSNull()

alternative: (sandwich your property change)

CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions)
// change properties here without animation

Remember to set the delegate of your CALayer instance to an instance of a class that at least extends NSObject. In this example we extend NSView.