Chapter 9: Removing the reference to the original layer

In section “Switching on key values” we have to remove the reference to the original layer like so:

anim.setValue(nil, forKey: “layer”)

Why is that? I commented out that line and saw no changes.

Thank you in advance for your time!

@icanzilb Can you please provide any feedback on this? Thank you - much appreciated! :]

there is no visible change when you remove the layer reference. holding a reference to the layer in first place is just for your own convenience so you can access it later on, you can delete the reference or keep it - up to you

This topic was automatically closed after 166 days. New replies are no longer allowed.