{"id":2245,"url":"https://github.com/SVProgressHUD/SVProgressHUD","last_synced_at":"2025-08-02T23:32:26.460Z","repository":{"id":39615333,"uuid":"1538210","full_name":"SVProgressHUD/SVProgressHUD","owner":"SVProgressHUD","description":"A clean and lightweight progress HUD for your iOS and tvOS app.","archived":false,"fork":false,"pushed_at":"2024-08-08T13:49:17.000Z","size":1426,"stargazers_count":12441,"open_issues_count":74,"forks_count":2639,"subscribers_count":325,"default_branch":"master","last_synced_at":"2024-10-29T10:54:24.482Z","etag":null,"topics":["apple","carthage","cocoapods","hud","ios","objective-c","progress","svprogresshud","swift","tvos"],"latest_commit_sha":null,"homepage":"https://github.com/SVProgressHUD/SVProgressHUD","language":"Objective-C","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/SVProgressHUD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2011-03-28T19:23:04.000Z","updated_at":"2024-10-24T17:42:27.000Z","dependencies_parsed_at":"2022-07-14T03:40:35.683Z","dependency_job_id":"adeb0bf8-d465-46fe-a0ce-04481687097d","html_url":"https://github.com/SVProgressHUD/SVProgressHUD","commit_stats":{"total_commits":590,"total_committers":123,"mean_commits":4.796747967479675,"dds":0.6627118644067796,"last_synced_commit":"de1d4dba816a19454329031156b8788692bcfa2c"},"previous_names":["samvermette/svprogresshud"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVProgressHUD%2FSVProgressHUD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVProgressHUD%2FSVProgressHUD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVProgressHUD%2FSVProgressHUD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SVProgressHUD%2FSVProgressHUD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SVProgressHUD","download_url":"https://codeload.github.com/SVProgressHUD/SVProgressHUD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224989989,"owners_count":17403410,"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":["apple","carthage","cocoapods","hud","ios","objective-c","progress","svprogresshud","swift","tvos"],"created_at":"2024-01-05T20:16:08.721Z","updated_at":"2024-12-06T17:30:52.993Z","avatar_url":"https://github.com/SVProgressHUD.png","language":"Objective-C","readme":"# SVProgressHUD\n\n![Pod Version](https://img.shields.io/cocoapods/v/SVProgressHUD.svg?style=flat)\n![Pod Platform](https://img.shields.io/cocoapods/p/SVProgressHUD.svg?style=flat)\n![Pod License](https://img.shields.io/cocoapods/l/SVProgressHUD.svg?style=flat)\n[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/)\n[![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-green.svg?style=flat)](https://cocoapods.org)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-green.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n`SVProgressHUD` is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS.\n\n![SVProgressHUD](https://raw.githubusercontent.com/SVProgressHUD/SVProgressHUD/master/Images/SVProgressHUD.png)\n\n## Installation\n\n### Swift Package Manager\n\n[Swift Package Manager](https://swift.org/package-manager/) (SwiftPM) is a tool for managing the distribution of Swift code. It simplifies the process of managing Swift package dependencies.\n\nTo integrate `SVProgressHUD` into your project using SwiftPM:\n\n1. In Xcode, select **File \u003e Add Package Dependency**.\n2. Enter the following package repository URL: https://github.com/SVProgressHUD/SVProgressHUD.git\n3. Choose the appropriate version (e.g. a specific version, branch, or commit).\n4. Add `SVProgressHUD` to your target dependencies.\n\n`SVProgressHUD` requires at least Swift tools version 5.3.\n\n### From CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like `SVProgressHUD` in your projects. First, add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html):\n\n```ruby\npod 'SVProgressHUD'\n```\n\nIf you want to use the latest features of `SVProgressHUD` use normal external source dependencies.\n\n```ruby\npod 'SVProgressHUD', :git =\u003e 'https://github.com/SVProgressHUD/SVProgressHUD.git'\n```\n\nThis pulls from the `master` branch directly.\n\nSecond, install `SVProgressHUD` into your project:\n\n```ruby\npod install\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate `SVProgressHUD` into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"SVProgressHUD/SVProgressHUD\"\n```\n\nRun `carthage bootstrap` to build the framework in your repository's Carthage directory. You can then include it in your target's `carthage copy-frameworks` build phase. For more information on this, please see [Carthage's documentation](https://github.com/carthage/carthage#if-youre-building-for-ios-tvos-or-watchos).\n\n### Manually\n\n* Drag the `SVProgressHUD/SVProgressHUD` folder into your project.\n* Take care that `SVProgressHUD.bundle` is added to `Targets-\u003eBuild Phases-\u003eCopy Bundle Resources`.\n* Add the **QuartzCore** framework to your project.\n\n## Swift\n\nEven though `SVProgressHUD` is written in Objective-C, it can be used in Swift with no hassle.\n\nIf you use [CocoaPods](http://cocoapods.org) add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html):\n\n```ruby\nuse_frameworks!\n```\n\nIf you added `SVProgressHUD` manually, just add a [bridging header](https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) file to your project with the `SVProgressHUD` header included.\n\n## Usage\n\n(see sample Xcode project in `/Demo`)\n\n`SVProgressHUD` is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[SVProgressHUD method]` / `SVProgressHUD.method()`).\n\n**Use `SVProgressHUD` wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.**\n\nUsing `SVProgressHUD` in your app will usually look as simple as this.\n\n**Objective-C:**\n\n```objective-c\n[SVProgressHUD show];\ndispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n    // time-consuming task\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [SVProgressHUD dismiss];\n    });\n});\n```\n\n**Swift:**\n\n```swift\nSVProgressHUD.show()\nDispatchQueue.global(qos: .default).async {\n    // time-consuming task\n    DispatchQueue.main.async {\n        SVProgressHUD.dismiss()\n    }\n}\n```\n\n### Showing the HUD\n\nYou can show the status of indeterminate tasks using one of the following:\n\n```objective-c\n+ (void)show;\n+ (void)showWithStatus:(NSString*)string;\n```\n\nIf you'd like the HUD to reflect the progress of a task, use one of these:\n\n```objective-c\n+ (void)showProgress:(CGFloat)progress;\n+ (void)showProgress:(CGFloat)progress status:(NSString*)status;\n```\n\n### Dismissing the HUD\n\nThe HUD can be dismissed using:\n\n```objective-c\n+ (void)dismiss;\n+ (void)dismissWithDelay:(NSTimeInterval)delay;\n```\n\nIf you'd like to stack HUDs, you can balance out every show call using:\n\n```\n+ (void)popActivity;\n```\n\nThe HUD will get dismissed once the `popActivity` calls will match the number of show calls.\n\nOr show an image with status before getting dismissed a little bit later. The display time depends on `minimumDismissTimeInterval` and the length of the given string.\n\n```objective-c\n+ (void)showInfoWithStatus:(NSString*)string;\n+ (void)showSuccessWithStatus:(NSString*)string;\n+ (void)showErrorWithStatus:(NSString*)string;\n+ (void)showImage:(UIImage*)image status:(NSString*)string;\n```\n\n## Customization\n\n`SVProgressHUD` is designed with flexibility in mind, providing a myriad of customization options to fit the look and feel of your application seamlessly.\n\n* Appearance: Make use of the `UI_APPEARANCE_SELECTOR` to adjust styles, colors, fonts, size, and images app-wide.\n* Behavior: Control visibility durations, display delays, and animation speeds.\n* Feedback: Enhance the user experience with options for haptic feedback and motion effects.\n\nFor a comprehensive list of properties and detailed explanations, refer to the `SVProgressHUD.h` file in the API documentation.\n\n### Hint\n\nAs standard `SVProgressHUD` offers three preconfigured styles:\n\n* `SVProgressHUDStyleAutomatic`: Automatically switch between the light and dark style\n* `SVProgressHUDStyleLight`: White background with black spinner and text\n* `SVProgressHUDStyleDark`: Black background with white spinner and text\n\nIf you want to use custom colors use `setForegroundColor:` and/or `setBackgroundColor:`. These implicitly set the HUD's style to `SVProgressHUDStyleCustom`.\n\n## Haptic Feedback\n\nAvailable on iPhone 7 and newer, `SVProgressHUD` can automatically trigger haptic feedback depending on which HUD is being displayed. The feedback maps as follows:\n\n* `showSuccessWithStatus:` \u003c-\u003e `UINotificationFeedbackTypeSuccess`\n* `showInfoWithStatus:` \u003c-\u003e `UINotificationFeedbackTypeWarning`\n* `showErrorWithStatus:` \u003c-\u003e `UINotificationFeedbackTypeError`\n\nTo enable this functionality, use `setHapticsEnabled:`.\n\n## Notifications\n\n`SVProgressHUD` posts four notifications via `NSNotificationCenter` in response to being shown/dismissed:\n\n* `SVProgressHUDWillAppearNotification` when the show animation starts\n* `SVProgressHUDDidAppearNotification` when the show animation completes\n* `SVProgressHUDWillDisappearNotification` when the dismiss animation starts\n* `SVProgressHUDDidDisappearNotification` when the dismiss animation completes\n\nEach notification passes a `userInfo` dictionary holding the HUD's status string (if any), retrievable via `SVProgressHUDStatusUserInfoKey`.\n\n`SVProgressHUD` also posts `SVProgressHUDDidReceiveTouchEventNotification` when users touch on the overall screen or `SVProgressHUDDidTouchDownInsideNotification` when a user touches on the HUD directly. For these notifications `userInfo` is not passed but the object parameter contains the `UIEvent` that related to the touch.\n\n## App Extensions\n\nWhen using `SVProgressHUD` in an App Extension, `#define SV_APP_EXTENSIONS` to avoid using unavailable APIs. This will be done automatically when using the `AppExtension` CocoaPods subspec. Additionally, call `setViewForExtension:` from your extensions view controller with `self.view`.\n\n## Contributing to this project\n\nIf you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/SVProgressHUD/SVProgressHUD/issues/new). Please take a moment to\nreview the guidelines written by [Nicolas Gallagher](https://github.com/necolas):\n\n* [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs)\n* [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features)\n* [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests)\n\n## License\n\n`SVProgressHUD` is distributed under the terms and conditions of the [MIT license](https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE). The success, error and info icons used on iOS 12 are made by [Freepik](http://www.freepik.com) from [Flaticon](https://www.flaticon.com) and are licensed under [Creative Commons BY 3.0](https://creativecommons.org/licenses/by/3.0/).\n\n## Privacy\n\n`SVProgressHUD` does not collect any data. A [privacy manifest file](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files) is [provided](SVProgressHUD/PrivacyInfo.xcprivacy).\n\n## Credits\n\n`SVProgressHUD` is brought to you by Sam Vermette, [Tobias Totzek](https://totzek.me) and [contributors to the project](https://github.com/SVProgressHUD/SVProgressHUD/contributors). If you're using `SVProgressHUD` in your project, attribution would be very appreciated.\n","funding_links":[],"categories":["UI","Objective-C","HarmonyOS","UI Components","Objective-C  Stars 1000以内排名整理","OOM-Leaks-Crash","9. 其他与展望","iOS","tvos","Minor"],"sub_categories":["Activity Indicator","Other free courses","Windows Manager","HUD-Indicator","5. 参考材料","界面控件","HUD"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSVProgressHUD%2FSVProgressHUD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSVProgressHUD%2FSVProgressHUD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSVProgressHUD%2FSVProgressHUD/lists"}