MTTCircularSlider is a circular slider for IOS
MTTCircularSlider is available on CocoaPods. Just add the following to your project Podfile:
pod 'MTTCircularSlider'
See dome Xcode project in /MTTCircularSliderDome
MTTCircularSlider* slider = [[MTTCircularSlider alloc] initWithFrame:CGRectMake(100, 100, 150, 150)];
[self.view addSubview:slider];
MTTCircularSlider* slider = [[MTTCircularSlider alloc] initWithFrame:CGRectMake(100, 100, 150, 150)];
slider.sliderStyle = MTTCircularSliderStyleImage;
slider.unselectImage = [UIImage imageNamed:@"unselect.png"];
slider.selectImage = [UIImage imageNamed:@"select.png"];
slider.indicatorImage = [UIImage imageNamed:@"indicator.png"];
[self.view addSubview:slider];
Image material(PSD Source)
[slider addTarget:self action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged];
[slider addTarget:self action:@selector(sliderEditingDidEnd:) forControlEvents:UIControlEventEditingDidEnd;
- MTTCircularSliderStyleDefault = 1, //Default Style
- MTTCircularSliderStyleImage = 2, //Customize Image Style
- MTTCircularSliderStyleNone = 0, //None Style
@property (nonatomic) MTTCircularSliderStyle sliderStyle;//Default:MTTCircularSliderStyleDefault
@property (nonatomic, getter=isCirculate) BOOL circulate;//Default:NO
The parameters are effective when MTTCircularSliderStyleDefault
@property (nonatomic) CGFloat lineWidth; //Default:20
@property (nonatomic, strong) UIColor* selectColor; //Default:#0a68ff
@property (nonatomic, strong) UIColor* unselectColor; //Default:#b5b5b5
@property (nonatomic, strong) UIColor* indicatorColor; //Default:#FFFFFF
@property (nonatomic) CGFloat contextPadding; //Default:10
The parameters are effective when MTTCircularSliderStyleImage
@property (nonatomic, strong) UIImage* selectImage;
@property (nonatomic, strong) UIImage* unselectImage;
@property (nonatomic, strong) UIImage* indicatorImage;
@property (nonatomic) NSInteger angle; //Default:0
@property (nonatomic) NSInteger maxAngle; //Default:360
@property (nonatomic) NSInteger minAngle; //Default:0
@property (nonatomic) CGFloat value; //Default:0
@property (nonatomic) CGFloat minValue; //Default:0
@property (nonatomic) CGFloat maxValue; //Default:1
MIT