我正在尝试为使用 CorePlot 创建的图形设置条纹填充。我在网上找到了一个例子:
CPColor *firstStripesColor = [CPColor colorWithComponentRed:1.0 green:1.0 blue:1.0 alpha:0.0];
CPColor *secondStripesColor = [CPColor colorWithComponentRed:1.0 green:1.0 blue:1.0 alpha:0.6];
CPFill *areaStripesFill = [CPFill fillWithFirstColor:firstStripesColor secondColor:secondStripesColor stripeWidth:2];
scatterPlot.areaFill = areaStripesFill;
我认为这段代码使用的是旧版本的 CorePlot 库(我使用的是 1.0)。我刚刚用 CPTColor 改变了 CPColor 和用 CPTFill 改变了 CPFill 但没有名为 fillWithFirstColor:secondColor: 的方法存在。我想创建一个类似于 iPhone Stocks 应用程序中的填充。
任何想法?
多谢
克劳斯