All Projects → EranBoudjnah → MTCircularSlider

EranBoudjnah / MTCircularSlider

Licence: other
A feature-rich circular slider control written in Swift.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to MTCircularSlider

range-slider
Customizable slider (range) component for JavaScript with no dependencies
Stars: ✭ 26 (-77.97%)
Mutual labels:  widget, slider
Widget
A set of widgets based on jQuery&&javascript. 一套基于jquery或javascript的插件库 :轮播、标签页、滚动条、下拉框、对话框、搜索提示、城市选择(城市三级联动)、日历等
Stars: ✭ 1,579 (+1238.14%)
Mutual labels:  widget, slider
height-slider
A customisable height slider for Flutter.
Stars: ✭ 15 (-87.29%)
Mutual labels:  widget, slider
Flutter fluid slider
A fluid design slider that works just like the Slider material widget.
Stars: ✭ 232 (+96.61%)
Mutual labels:  widget, slider
vue-onlySlider-x
Vue的移动端Slider滑动组件。无依赖、功能单一,只有左右滑动功能。如果你需要的仅仅是一个banner,那你可能需要它!
Stars: ✭ 35 (-70.34%)
Mutual labels:  slider, slider-component
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (-62.71%)
Mutual labels:  widget, slider
Flutter app
🔥🔥🔥本项目包括各种基本控件使用(Text、TextField、Icon、Image、Listview、Gridview、Picker、Stepper、Dialog、Slider、Row、Appbar、Sizebox、BottomSheet、Chip、Dismissible、FlutterLogo、Check、Switch、TabBar、BottomNavigationBar、Sliver等)、豆瓣电影、tubitv、每日一文、和天气、百姓生活、随机诗词、联系人、句子迷、好奇心日报、有道精品课、高德定位、音乐播放器🎵、追书神器等板块
Stars: ✭ 2,140 (+1713.56%)
Mutual labels:  widget, slider
react-color
🎨 Is a tiny color picker widget component for React apps.
Stars: ✭ 50 (-57.63%)
Mutual labels:  widget, slider
SASlider
SASlider is lightweight cool looking custom slider control which enables the user to input integer or decimal values with high customizeability. User can select values by inputting in text field above slider, slide the control or tap anywhere on the slider to move it.
Stars: ✭ 16 (-86.44%)
Mutual labels:  slider, slider-control
react-flickity-component
A React.js component for using @desandro's Flickity
Stars: ✭ 258 (+118.64%)
Mutual labels:  slider
BlockEditText
Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.
Stars: ✭ 113 (-4.24%)
Mutual labels:  widget
Pathslider
Numerical slider that follows a Bezier path
Stars: ✭ 15 (-87.29%)
Mutual labels:  slider
bromb
A feedback widget designed to be simple and customizable.
Stars: ✭ 41 (-65.25%)
Mutual labels:  widget
awesome-widgets
Minimalistic Plasmoid set
Stars: ✭ 60 (-49.15%)
Mutual labels:  widget
shiny-directory-input
An shiny input widget for selecting directories
Stars: ✭ 43 (-63.56%)
Mutual labels:  widget
slack widgets
An abstraction of the JSON structure needed to create widgets in Slack message attachments
Stars: ✭ 14 (-88.14%)
Mutual labels:  widget
pictureflow
Cover Flow clone at a Qt widget
Stars: ✭ 16 (-86.44%)
Mutual labels:  widget
yii2-highcharts-widget
HighCharts Js Widget for Yii2
Stars: ✭ 40 (-66.1%)
Mutual labels:  widget
em-beer-manager
Manage your beers with WordPress. Integrates simply with Untappd beer checkins. Great for everyone from home brewers to professional breweries!
Stars: ✭ 15 (-87.29%)
Mutual labels:  widget
awesome
Configs for awesomeWM
Stars: ✭ 42 (-64.41%)
Mutual labels:  widget

MTCircularSlider

CI Status Version License Platform

Screenshot

Screenshot from Simulator

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 10.0+

Installation

CocoaPods (iOS 10.0+)

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

pod "MTCircularSlider"

Manual Installation

The class file required for MTCircularSlider can be found in the following path:

MTCircularSlider/Classes/MTCircularSlider.swift

Usage

To run the example project, clone the repo and run pod install from the Example directory first.

MTCircularSlider implements IBDesignable and IBInspectable, and so can be configure directly from Interface Builder.

Usage in Code - Simple

To add a default circular slider, add the following code to your controller:

self.slider = MTCircularSlider(frame: self.sliderArea.bounds, options: nil)
self.slider?.addTarget(self, action: Selector("valueChange:"), forControlEvents: .ValueChanged)
self.sliderArea.addSubview(self.slider)

Usage in Code - Advanced

To add a custom circular slider, add the following code to your controller:

let attributes = [
/* Track */
Attributes.minTrackTint(.lightGray),
Attributes.maxTrackTint(.lightGray),
Attributes.trackWidth(12),
Attributes.trackShadowRadius(0),
Attributes.trackShadowDepth(0),
Attributes.trackMinAngle(180),
Attributes.trackMaxAngle(270),

/* Thumb */
Attributes.hasThumb(true),
Attributes.thumbTint(UIColor.darkGrayColor()),
Attributes.thumbRadius(8),
Attributes.thumbShadowRadius(0),
Attributes.thumbShadowDepth(0)
]

self.slider = MTCircularSlider(frame: self.sliderArea.bounds, options: nil)
self.slider.configure(attributes)
self.slider?.addTarget(self, action: Selector("valueChange:"), forControlEvents: .ValueChanged)
self.sliderArea.addSubview(self.slider)

Attributes

minTrackTint(UIColor)

Sets the color of the track up to the thumb.

maxTrackTint(UIColor)

Sets the color of the track from the thumb to the end of the track.

trackWidth(CGFloat)

Sets the width of the track in points.

Default value: 2

trackShadowRadius(CGFloat)

Sets the radius for the inner shadow on the track.

trackShadowDepth(CGFloat)

Sets the distance of the inner shadow on the track from the track edge.

trackMinAngle(Double)

Sets the minimum angle of the track in degrees.

Default value: 0

trackMaxAngle(Double)

Sets the maximum angle of the track in degrees.

Default value: 360

areTrackCapsRound(Bool)

Sets whether the edges of the track around round (true) or flat (false).

Default value: false

maxWinds(Float)

Sets the maximum number of times a user can wind the control. If set to a value other than 1, the difference between the minimum and maximum angles must be exactly 360 degrees.

Default value: 1

hasThumb(Bool)

Toggles the control between progress and slider modes. Setting hasThumb to true set the control to slider mode.

thumbTint(UIColor)

Sets the color of the thumb.

thumbRadius(CGFloat)

Sets the radius of the thumb in points.

thumbShadowRadius(CGFloat)

Sets the radius of the shadow the thumb drops.

thumbShadowDepth(CGFloat)

Sets the distance of the shadow the thumb from the thumb.

Functions

getThumbAngle() -> CGFloat

Returns the current angle of the thumb in radians.

Author

Eran Boudjnah, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].