{"id":2254,"url":"https://github.com/kaandedeoglu/KDCircularProgress","last_synced_at":"2025-08-02T23:32:26.984Z","repository":{"id":27083436,"uuid":"30550201","full_name":"kaandedeoglu/KDCircularProgress","owner":"kaandedeoglu","description":"A circular progress view with gradients written in Swift","archived":false,"fork":false,"pushed_at":"2023-05-19T18:28:51.000Z","size":1822,"stargazers_count":1205,"open_issues_count":30,"forks_count":217,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-29T17:49:11.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaandedeoglu.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,"governance":null}},"created_at":"2015-02-09T18:07:59.000Z","updated_at":"2024-10-23T02:35:14.000Z","dependencies_parsed_at":"2022-07-07T22:29:40.544Z","dependency_job_id":"26cc8cc6-b389-4a77-bf8c-2af40f348fe5","html_url":"https://github.com/kaandedeoglu/KDCircularProgress","commit_stats":{"total_commits":111,"total_committers":22,"mean_commits":5.045454545454546,"dds":"0.28828828828828834","last_synced_commit":"a51611e086ee74de3b1a395616f4e8766b22cde6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaandedeoglu%2FKDCircularProgress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaandedeoglu%2FKDCircularProgress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaandedeoglu%2FKDCircularProgress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaandedeoglu%2FKDCircularProgress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaandedeoglu","download_url":"https://codeload.github.com/kaandedeoglu/KDCircularProgress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223100262,"owners_count":17087388,"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":[],"created_at":"2024-01-05T20:16:08.974Z","updated_at":"2024-12-06T17:30:52.997Z","avatar_url":"https://github.com/kaandedeoglu.png","language":"Swift","funding_links":[],"categories":["UI","OOM-Leaks-Crash","Content","Swift"],"sub_categories":["Activity Indicator","Other free courses","WebView-ProgressBar","Progress Indicator"],"readme":"# KDCircularProgress\n\n[![Version](https://img.shields.io/cocoapods/v/KDCircularProgress.svg?style=flat)](http://cocoapods.org/pods/KDCircularProgress)\n[![License](https://img.shields.io/cocoapods/l/KDCircularProgress.svg?style=flat)](http://cocoapods.org/pods/KDCircularProgress)\n[![Platform](https://img.shields.io/cocoapods/p/KDCircularProgress.svg?style=flat)](http://cocoapods.org/pods/KDCircularProgress)\n\n`KDCircularProgress` is a circular progress view written in Swift. It makes it possible to have gradients in the progress view, along with glows and animations.\n\nKDCircularProgress also has `IBInspectable` and `IBDesignable` support, so you can configure and preview inside the `Interface Builder`. \n\n\nHere's an example\n\n[Youtube Link](http://youtu.be/iIdas72MXOg)\n\n\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot.gif)\n\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot.png)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot2.jpg)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot3.jpg)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot4.jpg)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot5.jpg)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot6.jpg)\n![Screenshot](https://raw.githubusercontent.com/kaandedeoglu/KDCircularProgress/master/Assets/screenshot7.jpg)\n\n## Requirements\n`KDCircularProgress` requires iOS 8+, although iOS 8 support hasn't been tested in a while.\n\n## Installation\n- It's on CocoaPods under the name (you guessed it!) KDCircularProgress\n- Just drag `KDCircularProgress.swift` into your project. `Carthage` support is on To-do list.\n\n### CocoaPods\n\nKDCircularProgress is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```bash\npod 'KDCircularProgress'\n```\n\nthen run\n\n```bash\n$ pod install\n```\n\n### Carthage\n\nAdd the line `github \"kaandedeoglu/KDCircularProgress\"` to your `Cartfile` and then run the command:\n\n```bash\ncarthage update\n```\n\n\n### Manually\n\nJust drag `KDCircularProgress.swift` into your project.\n\n## Sample Code\nBelow you can see code that creates and sets up a `KCircularProgress` instance. Which gives you a configuration that looks similar to the progress in the example images.\n\n```swift\nprogress = KDCircularProgress(frame: CGRect(x: 0, y: 0, width: 300, height: 300))\nprogress.startAngle = -90\nprogress.progressThickness = 0.2\nprogress.trackThickness = 0.6\nprogress.clockwise = true\nprogress.gradientRotateSpeed = 2\nprogress.roundedCorners = false\nprogress.glowMode = .forward\nprogress.glowAmount = 0.9\nprogress.set(colors: UIColor.cyan ,UIColor.white, UIColor.magenta, UIColor.white, UIColor.orange)\nprogress.center = CGPoint(x: view.center.x, y: view.center.y + 25)\nview.addSubview(progress)\n```\n\n## Properties\n\n#### progressColors: `[UIColor]`\nThe colors used to generate the gradient of the progress. You can also set this using the variadic `setColors(UIColor...)` method. A gradient is used only if there is more than one color. A fill is used otherwise. The default is a white fill.\n\n#### angle: `Int`\nThe angle of the progress. Between 0 and 360 (inclusive). Simply change its value in order to change the visual progress of the component. Default is 0.\n\n#### startAngle: `Int`\nThe angle at which the progress will begin. Between 0 and 360 (inclusive), however you can pass any negative or positive values and the component will mod them automatically to the required range. Default is 0.\n\n#### clockwise: `Bool`\nClockwise if true, Counter-clockwise if false. Default is true.\n\n#### roundedCorners: `Bool`\nWhen true, the ends of the progress track will be drawn with a half circle radius. Default is false.\n\n#### gradientRotateSpeed: `CGFloat`\nDescribes how many times the underlying gradient will perform a 2π rotation for each full cycle of the progress. Integer values recommended. Default is 0.\n\n#### glowAmount: `CGFloat`\nThe intensity of the glow. Between 0 and 1.0. Default is 1.0.\n\n#### glowMode: `KDCircularProgressGlowMode`\n- **.forward** - The glow increases proportionaly to the angle. No glow at 0 degrees and full glow at 360 degrees.\n\n- **.reverse** - The glow increases inversely proportional to the angle. Full glow at 0 degrees and no glow at 360 degrees.\n\n- **.constant** - Constant glow.\n\n- **.noGlow** - No glow\n\nThe default is **.forward**\n\n#### progressThickness: `CGFloat`\nThe thickness of the progress. Between 0 and 1. Default is 0.4\n\n#### trackThickness: `CGFloat`\nThe thickness of the background track. Between 0 and 1. Default is 0.5\n\n#### trackColor: `UIColor`\nThe color of the background track. Default is `UIColor.blackColor()`.\n\n#### progressInsideFillColor: `UIColor`\nThe color of the center of the circle. Default is `UIColor.clearColor()`.\n\n## Methods\n```swift \noverride public init(frame: CGRect)\n```\nInitialize with a frame. Please only use square frames.\n\n```swift \nconvenience public init(frame:CGRect, colors: UIColor...)\n```\nInitialize with a frame and the gradient colors.\n\n```swift \npublic func set(colors: UIColor...)\npublic func set(colors: [UIColor])\n```\nSet the colors for the progress gradient.\n\n\n```swift\npublic func animateFromAngle(fromAngle: Int, toAngle: Int, duration: NSTimeInterval, relativeDuration: Bool = true, completion: ((Bool) -\u003e Void)?)\n```\nAnimate the progress from an initial value to a final value, with a completion block that fires after the animation is done.\n`relativeDuration` - specify if the duration is for the specific animation or is the duration that would make a full turn.\n\n\n```swift\npublic func animateToAngle(toAngle: Int, duration: NSTimeInterval, completion: ((Bool) -\u003e Void)?)\n```\nAnimate the progress from the current state to a target value.\n\n```swift \npublic func pauseAnimation()\n```\nPause the animation, if any.\n\n\n```swift \npublic func isAnimating() -\u003e Bool\n```\nCheck if there's an active animation.\n\n## Misc\nPrefering light colors in the gradients gives better results. As mentioned before, use square frames. Rectangular frames are not tested and might produce unexpected results.\n\n## Contact\nDrop me an email if you want discuss anything further.\n\n[Email](kaandedeoglu@me.com)\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Kaan Dedeoglu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaandedeoglu%2FKDCircularProgress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaandedeoglu%2FKDCircularProgress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaandedeoglu%2FKDCircularProgress/lists"}