I am creating a grid of CALayers, is there a way I can set a tag or something so that I can identify it if I need to?
I can probably just make a data model with an NSArray to keep track, but it would be easier for my implementation if I could just store it in the layer.
CALayeris a KVC compliant class, so you can set a value for any key.For example:
You can then retrieve the value using:
See the Apple docs for more details.