Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taglia3/CircularSlider
A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.
https://github.com/taglia3/CircularSlider
Last synced: 3 months ago
JSON representation
A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.
- Host: GitHub
- URL: https://github.com/taglia3/CircularSlider
- Owner: taglia3
- License: mit
- Created: 2016-09-17T17:28:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T12:51:55.000Z (over 5 years ago)
- Last Synced: 2024-08-03T12:01:25.781Z (3 months ago)
- Language: Swift
- Homepage:
- Size: 1.57 MB
- Stars: 256
- Watchers: 8
- Forks: 42
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - CircularSlider - A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable. (UI / Slider)
- awesome-ios-star - CircularSlider - A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable. (UI / Slider)
README
# CircularSlider
A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.# Demo
![Slider demo](https://raw.githubusercontent.com/taglia3/CircularSlider/master/Gif/demo.gif)
# Installation
CircularSlider is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:Swift 3:
```ruby
pod 'CircularSlider'
```Swift 2.2:
```ruby
pod 'CircularSlider' ', '~> 0.2'
```# Usage
You can use this slider by declaring programmatically or by placing it in your Storyboard file.
All the paramters are IBInspectable, so you can configure the slider directly in the Storyboard file (in the attribute inspector tab) without write any line of code!
## Delegate
Optionally you can conforms to the methods of the CircularSliderDelegate protocol.If you want to admit only certain values you can implement this methods:
```swift
optional func circularSlider(circularSlider: CircularSlider, valueForValue value: Float) -> Float
```
With this method you override the actual slider value before the slider is updated.
Example: you want only rounded values:```swift
func circularSlider(circularSlider: CircularSlider, valueForValue value: Float) -> Float {
return floorf(value)
}
```The other methods you can implement are:
```swift
optional func circularSlider(circularSlider: CircularSlider, didBeginEditing textfield: UITextField)
optional func circularSlider(circularSlider: CircularSlider, didEndEditing textfield: UITextField)
```## Author
taglia3, [email protected]
[LinkedIn](https://www.linkedin.com/in/matteo-tagliafico-ba6985a3), Matteo Tagliafico
## License
CircularSpinner is available under the MIT license. See the LICENSE file for more info.