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

Overview

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.

Comments
  • Add the ability to remove decimals from the textField

    Add the ability to remove decimals from the textField

    Hey @taglia3! Great component! I love it ❤️

    It would be great if you can expose a configurable property to allow the use of it without the decimals. Thanks in advance!

    enhancement 
    opened by eliasturbay 5
  • How do I get values?

    How do I get values?

    How do I get values from the value range that I defined in interface builder?

    I installed CircularSlider from CocoaPods and added it in my main.storyboard, then I set the range from 1 to 1000, but I cannot get the values in the range 1-1000... I always get values in the following delegate functions from -2.X to 1.6... to 3.14....

    func circularSlider(circularSlider: CircularSlider, didBeginEditing textfield: UITextField) {
        
        //print("\(String(describing: textfield.text))")
        
    }
    
    func circularSlider(circularSlider: CircularSlider, didEndEditing textfield: UITextField) {
        
        print("asdf \(String(describing: circularSlider.title))")
        
    }
    

    }

    // MARK: - CircularSliderDelegate extension ViewController: CircularSliderDelegate { func circularSlider(_ circularSlider: CircularSlider, valueForValue value: Float) -> Float { return floorf(value) } }

    0.0 -1.64434761728344 ... 2.98358034030751 3.07363463664357 -3.07239637497121 ... -2.38914958780664 ... -1.53983277461192 -1.460139105621 -1.40709587429103 ... -1.87021156844839 ... 2.73103520554794

    opened by phishstang65 2
  • Update to Swift 4

    Update to Swift 4

    I updated project to swift 4, and I checked basically functionality. You can accept for update a project wich requires this library. I make a pull request to Develop branch Thanks

    opened by litoarias 0
  • Bitcode Processing Failed

    Bitcode Processing Failed

    While processing your iOS app, errors occurred in the app thinning process, and your app couldn’t be thinned. If your app contains bitcode, bitcode processing may have failed. Because of these errors, this build of your app will not be able to be submitted for review or placed on the App Store.

    opened by ghost 0
  • How can we set steps that how many steps slider need to be moved while Drag?

    How can we set steps that how many steps slider need to be moved while Drag?

    I need to use this slider as a Day viewer Like showing records of 7 Days So basically I need to create 7 Steps in slider if I drag slider it should move according to steps like we do in UISlider Any idea to achieve this

    Thanks

    opened by iOSDevGarg 0
  • BUG Fix: Changing color values in IB has no effect

    BUG Fix: Changing color values in IB has no effect

    Changing either the colors pgNormalColor or pgHighlightedColor in IB does not have any effect in IB and the app when it is executed.

    Adding these two lines fixes that problem.

    opened by franck-nadeau 0
  • Pull request: fix Swift warnings, add TextColor as IBDesignable ?

    Pull request: fix Swift warnings, add TextColor as IBDesignable ?

    Hello taglia3,

    Thanks for this fine CircularSlider library. I get a couple of swift warnings with newest xcode, 8.3.3, mainly M_PI usage and unused runtime attribute 'type'.

    I want to fix this. Also I want to add a IBDesignable for the text color of the value label. Is this project still active? Do you accept a pull-request for these changes? Thanks, Tom

    opened by TomMajor 1
Owner
Matteo Tagliafico
I'm an Electronic Engineer with the passion for iOS development
Matteo Tagliafico
A feature-rich circular slider control written in Swift.

MTCircularSlider Screenshot Usage To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 1

Eran Boudjnah 132 Jan 1, 2023
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

Hamza Ghazouani 2.4k Jan 4, 2023
PhotoSlider is a simple photo slider and can delete slider with swiping.

PhotoSlider is a simple photo slider and can delete slider with swiping.

Daichi Nakajima 247 Nov 30, 2022
A custom reusable slider control with 2 thumbs (range slider).

MARKRangeSlider A custom reusable slider control with 2 thumbs (range slider). Values range is between minimumValue and maximumValue (from 0 to 1 by d

Vadym Markov 181 Nov 21, 2022
StepSlider its custom implementation of slider such as UISlider for preset integer values.

StepSlider StepSlider its custom implementation of slider such as UISlider for preset values. Behind the scenes StepSlider manipulate integer indexes.

spromicky 520 Dec 20, 2022
VerticalSlider - An animatable and customizable vertical slider written in Swift 4

VerticalSlider An animatable and customizable vertical slider written in Swift 4. Quick Start VerticalSliderPlayground Clone Repo Open VSVerticalSlide

Vincent Smithers 13 Apr 26, 2022
IntervalSlider is a slider library like ReutersTV app. written in pure swift.

IntervalSlider Description and appetize.io`s DEMO To run the example project, clone the repo, and run pod install from the Example directory first. Re

Nobuyasu 65 May 23, 2021
An iOS Slider written in Swift.

JDSlider Beetripper App's screenshots Example Project To run the example project, clone the repo, and run pod install from the Example directory first

Jelly Development 84 Jul 26, 2022
Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle!

iLabeledSeekSlider Custom & highly configurable seek slider with sliding intervals, disabled state and every possible setting to tackle! Minimum iOS v

Edgar Žigis 9 Aug 16, 2022
Simple and light weight slider with chapter management

Simple and light weight slider with chapter management Demo Installation CocoaPods WESlider is available through CocoaPods. To install it, simply add

Lucas Ortis 89 Nov 29, 2022
A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.

TTRangeSlider A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range. Installation TTRangeSlider is availabl

Tom Thorpe 952 Dec 2, 2022
A simple range slider made in Swift

RangeSlider Summary A simple range slider made in Swift. Screenshot Use This control is IBDesignable and uses the target-action pattern for change not

William Archimede 305 Nov 29, 2022
A beautiful slider control for iOS built purely upon Swift

SnappingSlider A beautiful slider control for iOS. Installation There are two ways to add the control to your project; you can add it as a submodule i

Rehat Kathuria 577 Dec 15, 2022
VerticalSlider is a vertical slider control for iOS in Swift.

?? VerticalSlider If you like VerticalSlider, give it a ★ at the top right of this page. Overview VerticalSlider is a vertical implementation of the U

Jon Kent 78 Sep 15, 2022
💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion

FLUID SLIDER A slider widget with a popup bubble displaying the precise value selected written on Swift. We specialize in the designing and coding of

Ramotion 1.9k Dec 23, 2022
FlowerSlider - Flower Slider Animation Built With Swift

FlowerSlider Shape Slider Screenshot

Joey Graham 4 Sep 27, 2022
🎚️ STDiscreteSlider – slider which allows user to choose value only from predefined set of data.

STDiscreteSlider – slider which allows user to choose value only from predefined set of data. Slider may receive any types of options, you may pass set of integers or strings, or any other type. Written using SwiftUI.

Tamerlan Satualdypov 15 Apr 3, 2022
A reusable Slider View made with SwiftUI

ZSlider A reusable Slider View made with SwiftUI. Installation: Minimum version iOS 13 In Xcode go to File -> Swift Packages -> Add Package Dependency

null 7 Dec 15, 2022
TriggerSlider is a simple SwiftUI trigger slider

TriggerSlider is a simple SwiftUI trigger slider which can be used instead of a button, e.g. in a situation where the

Dominik Butz 4 Dec 16, 2022