【发布时间】:2013-10-25 12:09:47
【问题描述】:
我有很多关于 Legend 的条目。谁能帮忙使 CPTLegend 可滚动?
这是我用于CPTLegend 的代码。
-(void)configureLegend {
// 1 - Get graph instance
CPTGraph *graph = self.hostView.hostedGraph;
// 2 - Create legend
CPTLegend *theLegend = [CPTLegend legendWithGraph:graph];
// 3 - Configure legen
theLegend.numberOfColumns = 1;
theLegend.fill = [CPTFill fillWithColor:[CPTColor clearColor]];
theLegend.borderLineStyle = [CPTLineStyle lineStyle];
theLegend.cornerRadius = 2.0;
// 4 - Add legend to graph
graph.legend = theLegend;
graph.legendAnchor = CPTRectAnchorBottom;
CGFloat legendPadding = -(self.view.bounds.size.width / 3);
graph.legendDisplacement = CGPointMake(-80, 120.0);
}
【问题讨论】:
标签: ios iphone objective-c core-plot