{"id":16755811,"url":"https://github.com/quanvo87/wqnetworkactivityindicator","last_synced_at":"2025-06-23T01:03:27.781Z","repository":{"id":56926741,"uuid":"120149140","full_name":"quanvo87/WQNetworkActivityIndicator","owner":"quanvo87","description":"Manage the Network Activity Indicator with multiple network requests.","archived":false,"fork":false,"pushed_at":"2018-02-04T23:31:34.000Z","size":2996,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T20:47:21.843Z","etag":null,"topics":["activity","indicator","network"],"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/quanvo87.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":"2018-02-04T02:42:32.000Z","updated_at":"2018-02-05T00:44:26.000Z","dependencies_parsed_at":"2022-08-20T23:30:35.260Z","dependency_job_id":null,"html_url":"https://github.com/quanvo87/WQNetworkActivityIndicator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quanvo87%2FWQNetworkActivityIndicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quanvo87%2FWQNetworkActivityIndicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quanvo87%2FWQNetworkActivityIndicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quanvo87%2FWQNetworkActivityIndicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quanvo87","download_url":"https://codeload.github.com/quanvo87/WQNetworkActivityIndicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835938,"owners_count":20355611,"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":["activity","indicator","network"],"created_at":"2024-10-13T03:23:53.837Z","updated_at":"2025-03-16T06:41:43.212Z","avatar_url":"https://github.com/quanvo87.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WQNetworkActivityIndicator\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"WQNetworkActivityIndicator/Assets/demo.gif\" width=\"369\" title=\"Demo\"\u003e\n\u003c/p\u003e\n\n\u003c!--[![CI Status](http://img.shields.io/travis/quanvo87/WQNetworkActivityIndicator.svg?style=flat)](https://travis-ci.org/quanvo87/WQNetworkActivityIndicator)--\u003e\n[![Version](https://img.shields.io/cocoapods/v/WQNetworkActivityIndicator.svg?style=flat)](http://cocoapods.org/pods/WQNetworkActivityIndicator)\n[![License](https://img.shields.io/cocoapods/l/WQNetworkActivityIndicator.svg?style=flat)](http://cocoapods.org/pods/WQNetworkActivityIndicator)\n[![Platform](https://img.shields.io/cocoapods/p/WQNetworkActivityIndicator.svg?style=flat)](http://cocoapods.org/pods/WQNetworkActivityIndicator)\n[![Swift](https://img.shields.io/badge/Swift-4.0-orange.svg)](https://swift.org)\n\nProvides an easy way to manage the Network Activity Indicator with multiple network requests.\n\n## Features\n\n- [x] Prevents a network request from prematurely hiding the Network Activity Indicator if there are still other network requests in progress\n- [x] Prevents errors in the event that `show()` and `hide()` calls become unbalanced\n- [x] Has an optional timeout built into `show()`, in case a network request takes too long, or the calls become unbalanced\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\nWQNetworkActivityIndicator is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'WQNetworkActivityIndicator'\n```\n\n## Usage\n\n#### Show the Network Activity Indicator:\n\n```swift\nWQNetworkActivityIndicator.shared.show()\n```\n\n#### Hide the Network Activity Indicator:\n\n```swift\nWQNetworkActivityIndicator.shared.hide()\n```\n\n#### Multiple network requests:\n\n```swift\nWQNetworkActivityIndicator.shared.show()\n\nnetworkRequestA() {\n    WQNetworkActivityIndicator.shared.hide()\n}\n\nWQNetworkActivityIndicator.shared.show()\n\nnetworkRequestB() {\n    WQNetworkActivityIndicator.shared.hide()\n}\n```\n\n\u003e The Network Activity Indicator will stop showing only when both requests are done.\n\n#### Force the Network Activity Indicator to hide:\n\n```swift\nWQNetworkActivityIndicator.shared.hide(force: true)\n```\n\n#### Change the timeout\n\nThe `timeout` defaults to `10` seconds. Set it to `0` to disable it:\n\n```swift\nWQNetworkActivityIndicator.shared.timeout = 0\n```\n\n## Authors\n\n- [Quan Vo](https://github.com/quanvo87)\n- [Wilson Ding](https://github.com/dingwilson)\n\nBased off [MXNetworkActivityIndicator](https://github.com/g20ready/MXNetworkActivityIndicator).\n\n## License\n\nWQNetworkActivityIndicator 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%2Fquanvo87%2Fwqnetworkactivityindicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquanvo87%2Fwqnetworkactivityindicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquanvo87%2Fwqnetworkactivityindicator/lists"}