Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
spromicky committed Jan 15, 2017
1 parent c1cf119 commit d7b13c9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
# StepSlider

StepSlider its custom implementation of slider such as UISlider for preset values. Behind the scenes StepSlider manipulate integer indexes. Its based on drawing directlyon CAShapeLayer.
StepSlider its custom implementation of slider such as `UISlider` for preset values. Behind the scenes StepSlider manipulate integer indexes. Its based on drawing directlyon `CAShapeLayer`.

You can add StepSlider right from code with any of standard initialisers. Or you can add it directly on your storybord. Its fully IBDesignable and IBInspetable compatible.
![](example.gif)

You can try it on [Appetize.io](https://appetize.io/app/pwhnvf8aqf6386t0qh4dxgbjy8).
## Usage

![](example.gif)
You can add StepSlider right from code with any of standard initialisers. Or you can add it directly on your storybord. Its fully `IBDesignable` and `IBInspetable` compatible.

```objec
StepSlider *slider = [[StepSlider alloc] initWithFrame:CGRectMake(10.f, 200.f, 300.f, 44.f)];
[slider setMaxCount:10];
[slider setIndex:2];
[self.view addSubview:slider];
```

StepSlider can be fully customised by any of this properties:

- `trackHeight`
- `trackCircleRadius`
- `sliderCircleRadius`
- `dotsInteractionEnabled`
- `trackColor`
- `sliderCircleColor`
- `sliderCircleImage`

#### Labels

From version 1.0.0 StepSlider support labels near each circle on track.

```obje
slider.labels = @[@"Some string", @"another string", @"one more"];
```

![](example_labels.gif)

`slider.adjustLabel` - set first and last label to exactly to frame left and right.

## Requirements

- iOS 7.0+
- Xcode 7
- Xcode 8

## Installation

Expand Down
Binary file modified example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example_labels.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7b13c9

Please sign in to comment.