<div dir="ltr">When declaring a collection, it would be nice to have a way of knowing when an item is set/added and removed.<div><br></div><div>For example you could trigger a layer to be added to the layer hiearchy.</div><div><br></div><div>var shapeLayers: [CAShapeLayer] {</div><div><br></div><div>didAdd(item) {</div><div> addSubLayer(item)</div><div>}</div><div><br></div><div>willRemove(item){</div><div> item.removeFromSuperlayer()</div><div>}</div><div>}</div><div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="font-size:16px;line-height:19.2px"></span><span style="font-size:12.8px"> Wizard</span><br></div><div><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a></div><div>+44 7523 279 698</div></div></div></div></div></div>
</div></div>