The approach that you describe for setting the layerInd action of a layer to NSNull works, but it's a bit of a sledgehammer. When you do this, you will forever lose the implicit animation of the strokeEnd property of your layer.
If that's what you want, that's fine. However, I prefer to use the second approach that David Ronquist lists in the answer you linked: changing your layer inside the CATransaction trigger / lock block. Here is the code for the answer from David (which is great, since his messages are always there).
[CATransaction begin]; [CATransaction setDisableActions:YES];
This code is in Objective-C. Translating it to Swift is not so bad:
CATransaction.begin() CATransaction.setDisableActions(true) yourShapeLayer.strokeEnd = 0.7 CATransaction.commit()
source share