# CPSliderView **Repository Path**: soyeon/CPSliderView ## Basic Information - **Project Name**: CPSliderView - **Description**: 一个自定义的滑块控件 - **Primary Language**: Objective-C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-03-22 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #CPSliderView ## 简介 **CPSliderView**,是一个自定义的滑块控件,简单易用,比较好看。 主要用于评价啥的。 ##使用方法 导入头文件``` #improt "CPSliderView"```初始化并设置相关属性。 ``` CPSliderView *slider = [[CPSliderView alloc] initWithFrame:CGRectMake(50, 100, self.view.frame.size.width - 100, 30) style:CPSliderViewStyleHeart count:5 valueChangeBlock:^(CGFloat value) { NSLog(@"%.1f", value); }]; slider.trajectoryColor = [UIColor lightGrayColor]; // 设置轨迹颜色 slider.progressColor = [UIColor orangeColor]; // 设置已划过的颜色 slider.value = 0.5; // 设置初始值 ```