{"id":13717353,"url":"https://github.com/luispadron/UICircularProgressRing","last_synced_at":"2025-05-07T07:31:13.326Z","repository":{"id":45289140,"uuid":"68157963","full_name":"luispadron/UICircularProgressRing","owner":"luispadron","description":"A circular progress bar for iOS written in Swift ","archived":true,"fork":false,"pushed_at":"2021-12-24T05:02:10.000Z","size":31693,"stargazers_count":1725,"open_issues_count":0,"forks_count":290,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-10-29T11:27:28.269Z","etag":null,"topics":["animation","bar","circular","circular-progress-bar","clock","ios","progress","ring","swift","timer","xcode"],"latest_commit_sha":null,"homepage":"","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/luispadron.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-14T00:11:48.000Z","updated_at":"2024-10-12T12:25:20.000Z","dependencies_parsed_at":"2022-09-13T04:41:13.839Z","dependency_job_id":null,"html_url":"https://github.com/luispadron/UICircularProgressRing","commit_stats":null,"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispadron%2FUICircularProgressRing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispadron%2FUICircularProgressRing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispadron%2FUICircularProgressRing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispadron%2FUICircularProgressRing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luispadron","download_url":"https://codeload.github.com/luispadron/UICircularProgressRing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224573490,"owners_count":17333804,"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":["animation","bar","circular","circular-progress-bar","clock","ios","progress","ring","swift","timer","xcode"],"created_at":"2024-08-03T00:01:21.120Z","updated_at":"2024-11-14T05:31:32.891Z","avatar_url":"https://github.com/luispadron.png","language":"Swift","readme":"## UICircularProgressRing\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./.github/demo.gif\"/\u003e\n\u003c/p\u003e\n\nUICircularProgress ring is a library for rendering circular progress rings and timers.\n\n- **Declarative:** Written using [SwiftUI](https://developer.apple.com/xcode/swiftui/) (*legacy UIKit version available*), UICircularProgressRing is declarative making it easy to read, and easy to use.\n- **Customizable:** Designed to be used in production, all of the views are highly customizable without giving up ease of use. This allows the developer to tailor the look, feel and functionality to fit their needs.\n- **Tested:** Battle tested in many [production applications](#apps-using-uicircularprogressring). UICircularProgressRing is also fully unit tested as well as snapshot tested so developers can feel safe.\n- **Documented:** UICircularProgressRing's public API is 100% documented and its something that is enforced before any code is ever added. This is a resource that will help any new user understand how to get the most out of this library.\n\n## iOS 14+ Note\n\nSince Apple has now added a built in [ProgressView](https://developer.apple.com/documentation/swiftui/progressview) the need for this library is about to be over. My recommendation: If you can support iOS 14.0 and use the new system `ProgressView` then you should use that. This library will be continued to be maintained (critical bugs will be fixed, etc) but no new features are planned as we are reaching EOL for this library.\n\n## Installation\n\nUICircularProgressRing is available in two major versions. The latest version **v7.0+** or legacy versions. The legacy version is written using UIKit and requires a deployment target of `iOS 8.0+` or `tvOS 10.0+`. The latest version is written in SwiftUI and requires `iOS 13.0+`, `macOS 15.0+`, `tvOS 13.0+` or `WatchOS 2.0+`.\n\nFor legacy installation, [follow these](./LegacyREADME.md) instructions.\n\n### Swift Package Manager\n\nSimply add this library to your package manifest or follow instructions on adding a package dependency [using Xcode here](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n```swift\n.package(\n    url: \"https://github.com/luispadron/UICircularProgressRing.git\",\n    .branch(\"master\")\n)\n```\n\n## Documentation\n\nThis projects public API is 100% documented and it's something we spend a lot of time working on. Please make sure to read the documentation before opening any issues, questions, etc.\n\n[Read the documentation 📖](https://htmlpreview.github.io/?https://github.com/luispadron/UICircularProgressRing/blob/master/docs/index.html)\n\n## Usage\n\n### ProgressRing\n\n`ProgressRing` is a view designed to display some kind of progress, this can be anything which is represented as a percentage in the range `[0, ∞)`. A percentage is represented in decimal format, i.e. `0.5` is `50%`. Progress may be a downloading operation, the grade percentage of a users test score, etc. A short example of using `ProgressRing` is shown below, for more details [read the docs](#documentation) or play with the [example app](/Example/).\n\n```swift\nstruct ProgressRingExample: View {\n    @State var progress = RingProgress.percent(0.44)\n\n    var body: some View {\n        VStack {\n            ProgressRing(\n                progress: $progress,\n                axis: .top,\n                clockwise: true,\n                outerRingStyle: .init(\n                    color: .color(.gray),\n                    strokeStyle: .init(lineWidth: 20)\n                ),\n                innerRingStyle: .init(\n                    color: .color(.green),\n                    strokeStyle: .init(lineWidth: 10),\n                    padding: 5\n                )\n            )\n                .animation(.easeInOut(duration: 5))\n                .padding(32)\n        }\n    }\n}\n```\n\n![An example image of a ProgressRing view rendered with a green inner circle, a gray outer circle and at 44 percent completion.](./.github/progress-ring-demo.png)\n\n### TimerRing\n\n`TimerRing` is a view designed to display time. You initialize the timer by giving it a unit of time and duration, for example: `.seconds(60)`. This means the `TimerRing` will run for 60 seconds, filling up the inner ring until finally reaching 100% around the entire outer ring.\nA short example of using `TimerRing` is shown below, for more details [read the docs](#documentation) or play with the [example app](/Example/).\n\n```swift\nstruct TimerRingExample: View {\n    @State var isPaused = false\n    @State var isDone = false\n\n    var body: some View {\n        TimerRing(\n            time: .minutes(1),\n            delay: .seconds(0.5),\n            innerRingStyle: .init(\n                color: .color(.green),\n                strokeStyle: .init(lineWidth: 16),\n                padding: 8\n            ),\n            isPaused: $isTimerPaused,\n            isDone: $isTimerDone\n        ) { currentTime in\n            Text(timeFormatter.string(from: currentTime))\n                .font(.title)\n                .bold()\n        }\n    }\n}\n```\n\n![A demo image of a timer ring view with a green inner ring, a gray outer ring and at twenty-seven seconds.](./.github/timer-ring-demo.png)\n\n## Examples\n\n- [Loading/Spinner](./Example/UICircularProgressRingExample/Examples/IndeterminateExample.swift)\n- [Networking](./Example/UICircularProgressRingExample/Examples/NetworkingProgressExample.swift)\n\n## Apps Using UICircularProgressRing\n\n- [GradePoint](http://gradepoint.luispadron.com) by Luis Padron.\n- [UVI Mate](https://itunes.apple.com/us/app/uvi-mate-global-uv-indethex-now/id1207745216?mt=8) by Alexander Ershov.\n- [HotelTonight](https://itunes.apple.com/app/id407690035?mt=8) by Hotel Tonight Inc.\n- [הנתיב המהיר](https://itunes.apple.com/us/app/הנתיב-המהיר/id1320456872?mt=8) by Elad Hayun\n- [Nyx Nightclub Management](https://itunes.apple.com/dk/app/nyx-nightclub-management-ipad/id954874082?mt=8) by Nyx Systems IVS\n- [Barstool Sports](https://itunes.apple.com/us/app/barstool-sports/id456805313) by Barstool Sports\n- [88 Days](http://88-days.com) by Stijn Kramer\n- [Bookbot](https://www.bookbotkids.com) by Bookbot\n- [car2go](https://apps.apple.com/us/app/car2go/id514921710) by car2go Group GmbH","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluispadron%2FUICircularProgressRing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluispadron%2FUICircularProgressRing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluispadron%2FUICircularProgressRing/lists"}