- (void)drawLine{
//view是曲线的背景view
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(10, 0, 300, 300)];
view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:view];
//第一、UIBezierPath绘制线段
UIBezierPath *path = [UIBezierPath bezierPath];
//四个点
CGPoint point = CGPointMake(10, 10);
CGPoint point1 = CGPointMake(200, 100);
CGPoint point2 = CGPointMake(240, 200);
CGPoint point3 = CGPointMake(290, 200);
NSArray *arr = [NSArray arrayWithObjects:[NSValue valueWithCGPoint:point],[NSValue valueWithCGPoint:point1],[NSValue valueWithCGPoint:point2],[NSValue valueWithCGPoint:point3], nil];
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, arr.count)];
//第二、就是这句话绘制
[arr enumerateObjectsAtIndexes:set options:0