All Projects → vadymmarkov → MARKCircularSlider

vadymmarkov / MARKCircularSlider

Licence: other
An easy-to-use circular slider

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

MARKCircularSlider

Version License Platform

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].