What are the alternatives to Core-Plot for drawing

2019-01-21 06:52发布

Are there any alternatives to Core-Plot for drawing graphs in iPhone SDK?

I am having hard time integrating core-plot in my app. Lot of issues.

Can you please suggest some alternatives to core-plot?

4条回答
对你真心纯属浪费
2楼-- · 2019-01-21 07:37

If what you intend to draw is relatively easy, you may get quick results by using Quartz and drawing the graph yourself. Just subclass an UIView and override its drawRect: method.


A very, very simple example of drawing a square, 10x50 pixels at a fixed position, via Quartz:

- (void) drawRect:(CGRect)rect
{
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGColorRef red = [[UIColor redColor] CGColor];

    CGRect barRect = CGRectMake(10.f, 20.f, 10.f, 50.f);
    CGContextSetFillColorWithColor(ctx, red);
    CGContextFillRect(ctx, barRect);
}
查看更多
混吃等死
3楼-- · 2019-01-21 07:41

Since the OP asked his questions, there has been an abundance of new chart libraries. GraphKit, TWRCharts, to name only two. CocoaControls lists a lot more, if you do a search for 'graph'. So I'd like to gather more feedback with regards to this question.

查看更多
甜甜的少女心
4楼-- · 2019-01-21 07:50

iOSPlot, iOS:Chart, KeepEdge Library, Shinobi Controls

查看更多
登录 后发表回答