0
我已经添加了阴影的馅饼情节,但我也获得标签数据的阴影。我想删除那个影子。请帮帮我。 在此先感谢。如何删除标签的阴影添加到馅饼阴谋使用核心阴谋libraru在iphone sdk
piePlot.dataSource = self;
piePlot.pieRadius = 65.0;
piePlot.pieInnerRadius = 35.0;
piePlot.shadowColor = [[UIColor blackColor]CGColor];
piePlot.shadowRadius = 3.0;
piePlot.shadowOffset = CGSizeMake(8,-3);
piePlot.shadowOpacity = 1.0;
piePlot.identifier = @"Current Year Credits By Type";
piePlot.startAngle = M_PI_4;
piePlot.sliceDirection = CPTPieDirectionClockwise;
piePlot.borderLineStyle = [CPTLineStyle lineStyle];
piePlot.sliceLabelOffset = 10.0;
- (CPTLayer *)dataLabelForPlot:(CPTPlot *)情节recordIndex:(NSUInteger)指数 {
CPTTextLayer *newLayer = nil;
static CPTMutableTextStyle *whiteText = nil;
if (!whiteText)
{
whiteText = [[CPTMutableTextStyle alloc] init];
whiteText.color = [CPTColor blackColor];
}
if ([plot isKindOfClass:[CPTPieChart class]])
{
NSString *str = [NSString stringWithFormat:@"%@",[pieChartData1 objectAtIndex:index]];
newLayer = [[[CPTTextLayer alloc] initWithText:str style:whiteText] autorelease];
}
return newLayer;
}
它示出错误,因为(1) 'CPTMutableShadow' 未申报(先入此函数中使用)。(2) 'blackShadow' 未申报(先入此函数中使用)。(3)请求构件 '阴影'在某种不是结构或联盟的东西中。 –
你使用的是什么版本的Core Plot?在0.4到0.9之间增加了暗影支持。 –
我正在使用0.4版本 –