项目介绍:
自定义折线图,动画遮罩图层效果,根据传入的值自动匹配坐标,点击按钮会显示数值。
集成代码:
[Objective-C] 查看源文件 复制代码
lineView = [[ChartLineInfoView alloc]initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, 200)]; lineView.backgroundColor = [UIColor clearColor]; lineView.leftDataArr = @[@"0.2",@"0.4",@"0.5",@"0.2",@"0.7",@"0.5"]; lineView.rightDataArr = @[@"0.2",@"0.4",@"0.5",@"0.2",@"0.7",@"0.5"]; [self.view addSubview:lineView];
DEMO 直接下载: