0
是否可以将UIImageView添加到CPTBarPlot图层(从Core Plot框架中)?我曾尝试以下,但它只有在图形角创建图像,我希望它是上吧:如何将图像添加到Core Plot CPTBarPlot图层?
NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"wrong.png"];
UIImage *image = [[UIImage alloc] initWithContentsOfFile:bundlePath];
UIImageView *incorrect = [[UIImageView alloc] initWithFrame:CGRectMake(plot.bounds.origin.x,plot.bounds.origin.y,14,14)];
[incorrect setImage:image];
[plot addSublayer:incorrect.layer];
[image release];
[incorrect release];
谢谢!指出我的方向正确 – Skeep