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