{"id":2765,"url":"https://github.com/EranBoudjnah/MTCircularSlider","last_synced_at":"2025-08-03T12:31:06.090Z","repository":{"id":48656738,"uuid":"60028205","full_name":"EranBoudjnah/MTCircularSlider","owner":"EranBoudjnah","description":"A feature-rich circular slider control written in Swift.","archived":false,"fork":false,"pushed_at":"2021-07-15T16:26:05.000Z","size":767,"stargazers_count":137,"open_issues_count":1,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-24T18:57:32.671Z","etag":null,"topics":["ios","slider","slider-component","slider-control","swift","widget"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EranBoudjnah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-30T17:39:49.000Z","updated_at":"2024-04-01T10:25:59.000Z","dependencies_parsed_at":"2022-09-06T20:51:26.807Z","dependency_job_id":null,"html_url":"https://github.com/EranBoudjnah/MTCircularSlider","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FMTCircularSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FMTCircularSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FMTCircularSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FMTCircularSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EranBoudjnah","download_url":"https://codeload.github.com/EranBoudjnah/MTCircularSlider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543088,"owners_count":17934426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","slider","slider-component","slider-control","swift","widget"],"created_at":"2024-01-05T20:16:22.239Z","updated_at":"2024-12-07T00:30:52.528Z","avatar_url":"https://github.com/EranBoudjnah.png","language":"Swift","funding_links":[],"categories":["UI","Swift"],"sub_categories":["Slider","Layout","Other free courses"],"readme":"# MTCircularSlider\n\n[![CI Status](http://img.shields.io/travis/EranBoudjnah/MTCircularSlider.svg?style=flat)](https://travis-ci.org/EranBoudjnah/MTCircularSlider)\n[![Version](https://img.shields.io/cocoapods/v/MTCircularSlider.svg?style=flat)](http://cocoapods.org/pods/MTCircularSlider)\n[![License](https://img.shields.io/cocoapods/l/MTCircularSlider.svg?style=flat)](https://github.com/EranBoudjnah/MTCircularSlider/blob/master/LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/MTCircularSlider.svg?style=flat)](https://developer.apple.com/swift/resources/)\n\n## Screenshot\n\n![Screenshot from Simulator](https://user-images.githubusercontent.com/24318356/106140467-7e209880-6177-11eb-932a-3541f05273e9.gif)\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n- iOS 10.0+\n\n## Installation\n\n### CocoaPods (iOS 10.0+)\n\nMTCircularSlider is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"MTCircularSlider\"\n```\n\n### Manual Installation\n\nThe class file required for MTCircularSlider can be found in the following path:\n\n```\nMTCircularSlider/Classes/MTCircularSlider.swift\n```\n\n## Usage\n\nTo run the example project, clone the repo and run pod install from the Example directory first.\n\nMTCircularSlider implements IBDesignable and IBInspectable, and so can be configure directly from Interface Builder.\n\n\n### Usage in Code - Simple\n\nTo add a default circular slider, add the following code to your controller:\n\n```\nself.slider = MTCircularSlider(frame: self.sliderArea.bounds, options: nil)\nself.slider?.addTarget(self, action: Selector(\"valueChange:\"), forControlEvents: .ValueChanged)\nself.sliderArea.addSubview(self.slider)\n```\n\n### Usage in Code - Advanced\n\nTo add a custom circular slider, add the following code to your controller:\n\n```swift\nlet attributes = [\n/* Track */\nAttributes.minTrackTint(.lightGray),\nAttributes.maxTrackTint(.lightGray),\nAttributes.trackWidth(12),\nAttributes.trackShadowRadius(0),\nAttributes.trackShadowDepth(0),\nAttributes.trackMinAngle(180),\nAttributes.trackMaxAngle(270),\n\n/* Thumb */\nAttributes.hasThumb(true),\nAttributes.thumbTint(UIColor.darkGrayColor()),\nAttributes.thumbRadius(8),\nAttributes.thumbShadowRadius(0),\nAttributes.thumbShadowDepth(0)\n]\n\nself.slider = MTCircularSlider(frame: self.sliderArea.bounds, options: nil)\nself.slider.configure(attributes)\nself.slider?.addTarget(self, action: Selector(\"valueChange:\"), forControlEvents: .ValueChanged)\nself.sliderArea.addSubview(self.slider)\n```\n\n## Attributes\n\n###### ``minTrackTint(UIColor)``\n\nSets the color of the track up to the thumb.\n\n###### ``maxTrackTint(UIColor)``\n\nSets the color of the track from the thumb to the end of the track.\n\n###### ``trackWidth(CGFloat)``\n\nSets the width of the track in points.\n\nDefault value: 2\n\n###### ``trackShadowRadius(CGFloat)``\n\nSets the radius for the inner shadow on the track.\n\n###### ``trackShadowDepth(CGFloat)``\n\nSets the distance of the inner shadow on the track from the track edge.\n\n###### ``trackMinAngle(Double)``\n\nSets the minimum angle of the track in degrees.\n\nDefault value: 0\n\n###### ``trackMaxAngle(Double)``\n\nSets the maximum angle of the track in degrees.\n\nDefault value: 360\n\n###### ``areTrackCapsRound(Bool)``\n\nSets whether the edges of the track around round (true) or flat (false).\n\nDefault value: false\n\n###### ``maxWinds(Float)``\n\nSets the maximum number of times a user can wind the control. If set to a value\nother than 1, the difference between the minimum and maximum angles must be\nexactly 360 degrees.\n\nDefault value: 1\n\n###### ``hasThumb(Bool)``\n\nToggles the control between progress and slider modes. Setting hasThumb to true\nset the control to slider mode.\n\n###### ``thumbTint(UIColor)``\n\nSets the color of the thumb.\n\n###### ``thumbRadius(CGFloat)``\n\nSets the radius of the thumb in points.\n\n###### ``thumbShadowRadius(CGFloat)``\n\nSets the radius of the shadow the thumb drops.\n\n###### ``thumbShadowDepth(CGFloat)``\n\nSets the distance of the shadow the thumb from the thumb.\n\n## Functions\n\n###### ``getThumbAngle() -\u003e CGFloat``\n\nReturns the current angle of the thumb in radians.\n\n\n## Author\n\nEran Boudjnah, eranbou@gmail.com\n\n## License\n\nMTCircularSlider is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEranBoudjnah%2FMTCircularSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEranBoudjnah%2FMTCircularSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEranBoudjnah%2FMTCircularSlider/lists"}