问题
I am trying to perform an animation on each bar in the chart, however I am not quite sure how to access the calayer of each individual bar.
回答1:
There isn't one. All of the bars are drawn in one layer. If you need to animate them individually, make a separate CPTBarPlot (a subclass of CALayer) for each bar.
回答2:
I have another approach to this considering any performance issues you may face in future if your bars increases. You have a temporary CPTBarPlot with only one bar, to be used just for animation purpose. Use it to perform any animation and remove/hide it once you are done with animation.
来源:https://stackoverflow.com/questions/8874948/how-to-access-calayer-of-individual-bar-in-core-plot