GithubHelp home page GithubHelp logo

kb100824 / circularslider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from taglia3/circularslider

0.0 2.0 0.0 1.57 MB

A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.

License: MIT License

Ruby 2.08% Swift 57.52% Objective-C 2.26% Shell 38.14%

circularslider's Introduction

CircularSlider

A powerful Circular Slider. It's written in Swift, it's 100% IBDesignable and all parameters are IBInspectable.

Demo

Slider demo

Installation

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

Swift 3:

pod 'CircularSlider'

Swift 2.2:

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:

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:

func circularSlider(circularSlider: CircularSlider, valueForValue value: Float) -> Float {
return floorf(value)
}

The other methods you can implement are:

optional func circularSlider(circularSlider: CircularSlider, didBeginEditing textfield: UITextField)
optional func circularSlider(circularSlider: CircularSlider, didEndEditing textfield: UITextField)

Author

taglia3, [email protected]

LinkedIn, Matteo Tagliafico

License

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

circularslider's People

Contributors

mtagliafico avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.