How to get touch event on CPTLayer?
I'm using core plot to draw a bar chart, I was wondering is there a way I can have touch开发者_如何学C events on the bars? Thanks.
You use a delegate object to receive notification of touch events in Core Plot plots. For bar plots, implement the -barPlot:barWasSelectedAtRecordIndex:
method. The first parameter is the plot that was touched (so you can use the same delegate for more than one plot) and the second parameter is the index of the bar. Several of the example apps demonstrate usage.
精彩评论