Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsimenok/RSSliderView
Custom slider based on UIView for iOS
https://github.com/rsimenok/RSSliderView
objective-c slider vj vjing
Last synced: about 2 months ago
JSON representation
Custom slider based on UIView for iOS
- Host: GitHub
- URL: https://github.com/rsimenok/RSSliderView
- Owner: rsimenok
- License: mit
- Created: 2015-02-16T17:19:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-27T17:40:53.000Z (almost 4 years ago)
- Last Synced: 2023-02-28T02:47:12.032Z (almost 2 years ago)
- Topics: objective-c, slider, vj, vjing
- Language: Objective-C
- Homepage:
- Size: 207 KB
- Stars: 61
- Watchers: 5
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - RSSliderView - Custom slider based on UIView for iOS. 【 [Priview](https://camo.githubusercontent.com/7a7a899104ae97a30b0aae97bb2ce7d80a8a0f25/687474703a2f2f692e70696363792e696e666f2f69392f61666463643862353032396531663238623862643333663762643338323263312f313432343131383133392f31323632322f3738303432352f3132332e706e67) 】 (OOM-Leaks-Crash / Slider)
README
# RSSliderView
RSSliderView is a simple control for iOS based on UIView class.Preview:
## Create
RSSliderView is IBDesignable so you can create it in IB or programmatically as you prefer.``` Objective-C
RSSliderView *horSlider = [[RSSliderView alloc] initWithFrame:CGRectMake(20, 40, 280, 70)];
horSlider.delegate = self;
horSlider.backgroundColor = [UIColor colorWithRed:27.0/255.0 green:28.0/255.0 blue:37.0/255.0 alpha:1.0];
horSlider.foregroundColor = [UIColor colorWithRed:0.0 green:106.0/255.0 blue:95.0/255.0 alpha:1.0];
horSlider.handleColor = [UIColor colorWithRed:0.0 green:205.0/255.0 blue:184.0/255.0 alpha:1.0];
horSlider.borderColor = [UIColor colorWithRed:0.0 green:205.0/255.0 blue:184.0/255.0 alpha:1.0];
horSlider.text = @"Horizontal slider";
horSlider.textColor = [UIColor colorWithRed:0.0 green:205.0/255.0 blue:184.0/255.0 alpha:1.0];
[self.view addSubview:horSlider];
```Observe slider value change via delegate
``` Objective-C
- (void)sliderWillChangeValue:(RSSliderView *)sender;
- (void)sliderDidChangeValue:(RSSliderView *)sender;
```## Customize Appearance
``` Objective-C
@property (nonatomic, strong) IBInspectable UIColor *backgroundColor;
@property (nonatomic, strong) IBInspectable UIColor *foregroundColor;
@property (nonatomic, strong) IBInspectable UIColor *handleColor;
@property (nonatomic, strong) IBInspectable UIColor *borderColor;
@property (nonatomic, strong) IBInspectable UIColor *textColor;
@property (nonatomic, strong) IBInspectable NSString *text;
@property (nonatomic, strong) IBInspectable UIFont *font;
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
@property (nonatomic, assign) IBInspectable CGFloat borderWidth;
@property (nonatomic, assign) IBInspectable CGFloat handleWidth;
@property (nonatomic, assign) IBInspectable CGFloat onTapAnimationSpeed;
@property (nonatomic, assign, getter=isHandleHidden) IBInspectable BOOL handleHidden;
@property (nonatomic, assign) RSSliderViewOrientation orientation;
```## License
RSSliderView is licensed under the terms of the MIT license. Please see the [LICENSE](LICENSE) file for full details.