Dynamic Accessibility Label for CALayer
问题 How do I make a CALayer accessible? Specifically, I want the layer to be able to change its label on the fly, since it can change at any time. The official documentation's sample code does not really allow for this. 回答1: The following assumes that you have a superview whose layers are all of class AccessableLayer , but if you have a more complex layout this scheme can be modified to handle that. In order to make a CALayer accessible, you need a parent view that implements the