- Notifications
You must be signed in to change notification settings - Fork508
ProgressHUD is a lightweight and easy-to-use HUD for iOS. Over 5000+ animations.
License
relatedcode/ProgressHUD
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
For detailed changes, please refer to theChange log.
ProgressHUD is a convenient and intuitive HUD tool designed specifically for iOS. It enables the seamless presentation of concise alerts or notifications to your app users in a simple and non-disruptive way.
Note: This version (15.0.0+) is built with SwiftUI. If you need the UIKit version, please use version 14.1.4.
Swift Package Manager is a tool for managing Swift code distribution.
To addProgressHUD as a dependency to your project, follow these steps:
- Open your Swift project in Xcode.
- Navigate to
File->Add Package Dependencies.... - Paste
https://github.com/relatedcode/ProgressHUD.gitinto the search bar. - Choose the version you want to use and click
Add Package.
If you prefer not to use the dependency manager above, you can integrateProgressHUD into your project manually. Simply copy all the*.swift files from theSwiftUI/Sources folder into your Xcode project.
Add the.progressHUD() modifier to your root view:
import SwiftUI@mainstructMyApp:App{varbody:someScene{WindowGroup{ContentView().progressHUD()}}}
ProgressHUD.banner("Banner title","Banner message to display.")
ProgressHUD.banner("Banner title","Message to display.", delay:2.0)
ProgressHUD.bannerHide()
ProgressHUD.animate("Some text...")
ProgressHUD.animate("Some text...", interaction:false)
ProgressHUD.animate("Please wait...",.ballVerticalBounce)
ProgressHUD.succeed()
ProgressHUD.succeed("Some text...", delay:1.5)
ProgressHUD.failed()
ProgressHUD.failed("Some text...")
ProgressHUD.progress(0.15)
ProgressHUD.progress("Loading...",0.42)
ProgressHUD.symbol(name:"box.truck")
ProgressHUD.symbol("Some text...", name:"sun.max")
ProgressHUD.success("Success message")
ProgressHUD.error("Error message")
ProgressHUD.added("Item added")
ProgressHUD.animate("Loading...", symbol:"star.fill")
ProgressHUD.dismiss()
ProgressHUD.remove()
- iOS 17.0+
- Xcode 15.0+
You can customize attributes like color, font, image, animation type, size, and more by using these methods:
ProgressHUD.animationType=.circleStrokeSpin
ProgressHUD.colorHUD=.gray.opacity(0.1)
ProgressHUD.colorBackground=.gray.opacity(0.3)
ProgressHUD.colorAnimation=.blue
ProgressHUD.colorProgress=.blue
ProgressHUD.colorStatus=.primary
ProgressHUD.mediaSize=100ProgressHUD.marginSize=50
ProgressHUD.fontStatus=.system(size:24, weight:.bold)
ProgressHUD.imageSuccess=Image("success")ProgressHUD.imageError=Image("error")
Banner customization:
ProgressHUD.colorBanner=.blue.opacity(0.1)ProgressHUD.colorBannerTitle=.primaryProgressHUD.colorBannerMessage=.secondaryProgressHUD.fontBannerTitle=.system(size:16, weight:.semibold)ProgressHUD.fontBannerMessage=.system(size:14)
A comprehensive list of the predefined enums:
publicenumAnimationType:CaseIterable{case nonecase activityIndicatorcase ballVerticalBouncecase barSweepTogglecase circleArcDotSpincase circleBarSpinFadecase circleDotSpinFadecase circlePulseMultiplecase circlePulseSinglecase circleRippleMultiplecase circleRippleSinglecase circleRotateChasecase circleStrokeSpincase dualDotSidestepcase horizontalBarScalingcase horizontalDotScalingcase pacmanProgresscase quintupleDotDancecase semiRingRotationcase sfSymbolBouncecase squareCircuitSnakecase triangleDotShift}
publicenumLiveIcon{case succeedcase failedcase added}
MIT License
Copyright (c) 2025 Related Code
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
About
ProgressHUD is a lightweight and easy-to-use HUD for iOS. Over 5000+ animations.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.
