MARKCircularSlider 0.1.0

MARKCircularSlider 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2015

Maintained by Vadym Markov.



A custom reusable circular slider control. Values range is between minimumValue and maximumValue (from 0 to 1 by default).

Please check Demo project for a basic example on how to use MARKCircularSlider.

Demo

Alt text

Available control properties

  • value - the current value of the slider
  • minimumValue - the minimum value of the slider's range
  • maximumValue - the maximum value of the slider's range

Available styling properties

Customizable colors:

  • filledColor - color of the filled area
  • unfilledColor - color of the unfilled area

Usage

In your View Controller

- (void)viewDidLoad
{
    // ...
    self.slider = [[MARKCircularSlider alloc] initWithFrame:CGRectZero];
    self.slider.filledColor = [UIColor blueColor];
    self.slider.unfilledColor = [UIColor lightGrayColor];
    self.slider.minimumValue = 0;
    self.slider.maximumValue = 72;
    self.slider.value = 10;

    [self.slider addTarget:self
                         action:@selector(sliderValueDidChange:)
               forControlEvents:UIControlEventValueChanged];

    [self.view addSubview:self.slider];
    // ...
}

- (void)sliderValueDidChange:(MARKCircularSlider *)slider
{
    NSLog(@"%0.2f", slider.value);
}

Installation

MARKCircularSlider is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MARKCircularSlider'

Author

Vadym Markov, [email protected]

License

MARKCircularSlider is available under the MIT license. See the LICENSE file for more info.