{"id":2268,"url":"https://github.com/icanzilb/SwiftSpinner","last_synced_at":"2025-08-02T23:32:45.207Z","repository":{"id":43774542,"uuid":"29830555","full_name":"icanzilb/SwiftSpinner","owner":"icanzilb","description":"A beautiful activity indicator and modal alert written in Swift (originally developed for my app DoodleDoodle) Using blur effects, translucency, flat and bold design - all iOS 8 latest and greatest","archived":false,"fork":false,"pushed_at":"2021-01-10T13:48:21.000Z","size":2488,"stargazers_count":2190,"open_issues_count":16,"forks_count":268,"subscribers_count":56,"default_branch":"master","last_synced_at":"2024-10-29T15:34:29.770Z","etag":null,"topics":[],"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/icanzilb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-01-25T20:51:25.000Z","updated_at":"2024-10-29T07:13:45.000Z","dependencies_parsed_at":"2022-09-17T00:32:32.409Z","dependency_job_id":null,"html_url":"https://github.com/icanzilb/SwiftSpinner","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icanzilb%2FSwiftSpinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icanzilb%2FSwiftSpinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icanzilb%2FSwiftSpinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icanzilb%2FSwiftSpinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icanzilb","download_url":"https://codeload.github.com/icanzilb/SwiftSpinner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228383695,"owners_count":17911329,"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:09.371Z","updated_at":"2024-12-06T17:30:57.168Z","avatar_url":"https://github.com/icanzilb.png","language":"Swift","funding_links":[],"categories":["UI","Content","OOM-Leaks-Crash"],"sub_categories":["Activity Indicator","Other free courses","HUD-Indicator"],"readme":"# SwiftSpinner\n\n[![Version](https://img.shields.io/cocoapods/v/SwiftSpinner.svg?style=flat)](http://cocoadocs.org/docsets/SwiftSpinner)\n[![License](https://img.shields.io/cocoapods/l/SwiftSpinner.svg?style=flat)](http://cocoadocs.org/docsets/SwiftSpinner)\n[![Platform](https://img.shields.io/cocoapods/p/SwiftSpinner.svg?style=flat)](http://cocoadocs.org/docsets/SwiftSpinner)\n![Swift 5.0](https://img.shields.io/badge/swift-5.0-orange.svg)\n\nSwiftSpinner is an extra beautiful activity indicator with plain and bold style. It uses dynamic blur and translucency to overlay the current screen contents and display an activity indicator with text (or the so called “spinner”).\n\n- - -\n\nI developed it for my Swift app called **Doodle Doodle** and wanted to share it with everyone.\n\nThis is how the activity looks like (from the demo app):\n\n![SwiftSpinner Screenshot](https://raw.githubusercontent.com/icanzilb/SwiftSpinner/main/etc/spinner-preview.gif)\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the DemoApp directory first. That’ll run the demo program which shows you how the spinner looks like and what it can do.\n\n#### Code samples\n\nThe simple code to get `SwiftSpinner` running in your own app.\n\n * In case you installed SwiftSpinner via CocoaPods you need to import it (add this somewhere at the top of your source code file):\n\n```swift\nimport SwiftSpinner\n```\n\n * When you want to show an animated activity (eg. rings are randomly rotating around):\n\n```swift\nSwiftSpinner.show(\"Connecting to satellite...\")\n```\n\n * If you want to show a static activity indicator (eg. a message with two complete rings around it)\n\n```swift\nSwiftSpinner.show(\"Failed to connect, waiting...\", animated: false)\n```\n\n * When you want to hide the activity:\n\n```swift\nSwiftSpinner.hide()\n```\n\nIn case you want to do something after the hiding animation completes you can provide a closure to the `hide()` method:\n\n```swift\nSwiftSpinner.hide({\n  //do stuff\n})\n```\n\n\nThat's all. If you want to change the text of the current activity, just call `show(...)` again, this will animate the old text into the new text.\n\n## Beyond the basics\n\nIf you are using `SwiftSpinner` to show an alert message you can also easily add a dismiss handler:\n\n```swift\nSwiftSpinner.show(\"Connecting \\nto satellite...\").addTapHandler({\n  SwiftSpinner.hide()\n})\n```\n\nOr even add a subtitle to let the user know they can tap to do stuff:\n\n```swift\nSwiftSpinner.show(\"Connecting \\nto satellite...\").addTapHandler({\n  SwiftSpinner.hide()\n}, subtitle: \"Tap to hide while connecting! This will affect only the current operation.\")\n```\n\nIn case you want to adjust the font of the spinner title:\n\n```swift\nSwiftSpinner.setTitleFont(UIFont(name: \"Futura\", size: 22.0))\n```\n\nTo reset back to the default font:\n\n```swift\nSwiftSpinner.setTitleFont(nil)\n```\n\nIn case you want to change an arbitrary aspect of the text on screen access directly:\n\n```swift\nSwiftSpinner.shared.titleLabel\nSwiftSpinner.shared.subtitleLabel\n```\n\nYou can show a spinner only if certain amount of time has passed (e.g. if you are downloading a file - show a message only if the operation takes longer than certain amount of time):\n\n```swift\nSwiftSpinner.show(delay: 2.0, title: \"It's taking longer than expected\")\n```\n\nIf you call `show(…)` or `hide()` before the `delay` time has passed - this will clear the call to `show(delay: …)`.\n\nYou show a message for a certain duration:\n```swift\nSwiftSpinner.show(duration: 4.0, title: \"It's taking longer than expected\")\n```\n\nOr you can use `SwiftSpinner` as a progress bar by directly setting the current progress like so:\n\n```swift\nSwiftSpinner.show(progress: 0.2, title: \"Downloading Data...\") // 20% trough the process\n```\n\nIf you want to see the content behind the spinner, set the showBlurBackground to false:\n```swift\nSwiftSpinner.showBlurBackground = false\n```\n\n## Requirements\n\nUIKit must be imported. If you are using SwiftSpinner in an App Extension, you must add `EXTENSION` to your `Other Swift Flags` Build Settings.\n\n![Extension Setting Screenshot](https://user-images.githubusercontent.com/444725/26855417-a7a8241a-4acf-11e7-8528-b37a28448113.png)\n\n## Installation\n\n`SwiftSpinner` is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your `Podfile`:\n\n```\npod \"SwiftSpinner\"\n```\n\nIn case you don’t want to use CocoaPods - just copy the file **SwiftSpinner/SwiftSpinner.swift** to your Xcode project.\n\nCredit\n========\n\nAuthor: **Marin Todorov**\n\n* [http://www.underplot.com](http://www.underplot.com)\n* [https://twitter.com/icanzilb](https://twitter.com/icanzilb)\n\nMore about Marin:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ca href=\"http://www.ios-animations-by-tutorials.com/\"\u003e\u003cimg src=\"http://www.underplot.com/images/thumbs/iat.jpg\" width=\"170\"\u003e\u003cbr\u003e\n\u003cb\u003eiOS Animations by Tutorials\u003c/b\u003e, Author\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"http://www.ios-animations-by-emails.com/\"\u003e\u003cimg src=\"http://www.underplot.com/images/thumbs/ios-animations-by-emails.jpg\" width=\"170\"\u003e\u003cbr\u003e\niOS Animations by Emails Newsletter, Author\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## License\n\n`SwiftSpinner` 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%2Ficanzilb%2FSwiftSpinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficanzilb%2FSwiftSpinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficanzilb%2FSwiftSpinner/lists"}