Hi,
I want to make an application in which i want to make simple graph using NSObject class and using CGContext method. All lines should be displaying dynamically in X and Y-axis interval text also, i trying develop something like following code,
CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0);
CGContextSetLineWidth(ctx, 2.0);
//(number of lines)
CGContextMoveToPoint(ctx, 30.0, 230.0);
CGContextAddLineToPoint(ctx, 30.0, 440.0);
//CGContextAddLineToPoint(ctx, 320.0, 420.0);
//CGContextStrokePath(ctx);
for(float x = 20.0; x <= 320.0; x++)
{
CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0);
CGContextMoveToPoint(ctx, x, 420.0);
CGContextAddLineToPoint(ctx, x+45.0, 420.0);
CGContextStrokePath(ctx);
}
How i develop using above functions?
Thanks.