# YCurveView **Repository Path**: Ianhwu/YCurveView ## Basic Information - **Project Name**: YCurveView - **Description**: 折线和曲线图,可以加下面的mask。 - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2016-09-10 - **Last Updated**: 2022-10-25 ## Categories & Tags **Categories**: ios-modules **Tags**: None ## README # YCurveView a curve view Usage: self.curveView = [[YCurveView alloc] init]; self.curveView.frame = self.view.bounds; self.curveView.lineWidth = 2.0; self.curveView.points = @[[NSValue valueWithCGPoint:CGPointMake(10, 200)], [NSValue valueWithCGPoint:CGPointMake(50, 300)], [NSValue valueWithCGPoint:CGPointMake(130, 200)], [NSValue valueWithCGPoint:CGPointMake(200, 180)], [NSValue valueWithCGPoint:CGPointMake(250, 250)], [NSValue valueWithCGPoint:CGPointMake(300, 250)]]; [self.view addSubview:self.curveView]; // default a curve , have no mask ![alt text](http://git.oschina.net/yan_1564335/YCurveView/raw/master/snapshots/Simulator%20Screen%20Shot%202016年9月10日%20上午11.12.27.png?dir=0&filepath=snapshots%2FSimulator+Screen+Shot+2016年9月10日+上午11.12.27.png&oid=982432d7021f3f5a10ec527b918f649a541f426e&sha=697f3c114559627b9f7e02eddb0b54aa66e474e5) self.curveView.type = YCurveViewTypeBrokenLine; self.curveView.bottomMaskColor = [UIColor orangeColor]; ![alt text](http://git.oschina.net/yan_1564335/YCurveView/raw/master/snapshots/Simulator%20Screen%20Shot%202016年9月10日%20上午11.12.49.png?dir=0&filepath=snapshots%2FSimulator+Screen+Shot+2016年9月10日+上午11.12.49.png&oid=9a1392f780cbc6a9a78101d7d890729f49b5e9c8&sha=c32f6e164bfe1c74a210a7bee0c2006e10b53396) self.curveView.type = YCurveViewTypeBrokenLine; self.curveView.bottomMaskColor = [UIColor orangeColor]; ![alt text](http://git.oschina.net/yan_1564335/YCurveView/raw/master/snapshots/Simulator%20Screen%20Shot%202016年9月10日%20上午11.13.07.png?dir=0&filepath=snapshots%2FSimulator+Screen+Shot+2016年9月10日+上午11.13.07.png&oid=fa06a9a858f4914c6e74d3efab20bc75343f81e4&sha=7d2d5ab9eafff75eeb28d42ffd458535d6c4a4ea) self.curveView.bottomMaskColor = [UIColor orangeColor]; default type: ![alt text](http://git.oschina.net/yan_1564335/YCurveView/raw/master/snapshots/Simulator%20Screen%20Shot%202016年9月10日%20上午11.13.19.png?dir=0&filepath=snapshots%2FSimulator+Screen+Shot+2016年9月10日+上午11.13.19.png&oid=e117be94fe309c37b4ce4348231231629eef56d8&sha=9fedcc4e844794bc902573beceaefa0c1ef4faaa)