直线

CGPoint aPoints[3]; //坐标点

【直线】aPoints[0] = CGPointMake(100, 80); //坐标1
aPoints[1] = CGPointMake(130, 80); //坐标2
aPoints[2] = CGPointMake(130, 100); //坐标3
//参数分别为:哪个画布,坐标数组, 个数。
CGContextAddLines(context, aPoints, 3); //添加线
CGContextDrawPath(context, kCGPathStroke); //根据坐标绘制路径

    推荐阅读