ProgressHUD is a lightweight and easy-to-use HUD for iOS.

Overview


WHAT'S NEW IN 13.5 and 13.6

  • Bugfix related to iPad split screen
  • Bugfix related to showProgress

OVERVIEW

ProgressHUD is a lightweight and easy-to-use HUD for iOS.

INSTALLATION

CocoaPods:

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate ProgressHUD into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'ProgressHUD'

Manually

If you prefer not to use any of the dependency managers, you can integrate ProgressHUD into your project manually. Just copy the ProgressHUD.swift file in your Xcode project.

QUICK START

ProgressHUD.show("Some text...")
ProgressHUD.showSucceed()
ProgressHUD.showFailed()
ProgressHUD.showProgress(0.42)
ProgressHUD.show(icon: .heart)
ProgressHUD.dismiss()

REQUIREMENTS

  • iOS 13.0+

CUSTOMIZATION

You can customize the color, font, image, animation type, and other some options using the following methods:

ProgressHUD.animationType = .circleStrokeSpin
ProgressHUD.colorHUD = .systemGray
ProgressHUD.colorBackground = .lightGray
ProgressHUD.colorAnimation = .systemBlue
ProgressHUD.colorProgress = .systemBlue
ProgressHUD.colorStatus = .label
ProgressHUD.fontStatus = .boldSystemFont(ofSize: 24)
ProgressHUD.imageSuccess = UIImage(named: "success.png")
ProgressHUD.imageError = UIImage(named: "error.png")

The list of predefined animation and icon types:

public enum AnimationType {
	case systemActivityIndicator
	case horizontalCirclesPulse
	case lineScaling
	case singleCirclePulse
	case multipleCirclePulse
	case singleCircleScaleRipple
	case multipleCircleScaleRipple
	case circleSpinFade
	case lineSpinFade
	case circleRotateChase
	case circleStrokeSpin
}
public enum AnimatedIcon {
	case succeed
	case failed
	case added
}
public enum AlertIcon {
	case heart
	case doc
	case bookmark
	case moon
	case star
	case exclamation
	case flag
	case message
	case question
	case bolt
	case shuffle
	case eject
	case card
	case rotate
	case like
	case dislike
	case privacy
	case cart
	case search
}

LICENSE

MIT License

Copyright (c) 2021 Related Code

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 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 THE SOFTWARE.

Comments
  • Xcode 14 Beta 6 SwiftUI preview doesn't work

    Xcode 14 Beta 6 SwiftUI preview doesn't work

    Hello, I faced SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060004e28fd50):'ProgressHUD'>) error in Xcode Canvas SwiftUI preview in Xcode 14 Beta 4. Does anyone know how to solve it or maybe have a fix for it? Thanks

    opened by alexanderkhitev 4
  • Disable underlying view(s) and set the tintAdjustmentMode to dimmed

    Disable underlying view(s) and set the tintAdjustmentMode to dimmed

    Thanks for making this! I was wondering if it is possible to use the current code to disable user interaction on underlying views and to dim the tint on controls just like native alerts and modals. Being able to do this selectively would be awesome as well!

    opened by gargs 3
  • SwiftPM Support

    SwiftPM Support

    Description

    I've added Swift Package Manager support by creating a Package.Swift file. The source path has changed and therefor I adjusted it in the Pod Spec file. I've also bumped the version to 13.1.1 and created a new release - the version has been adjusted in the Pod Spec file and the VERSION.txt.

    opened by gaebel 3
  • Can not show immediately another HUD after dismissing previous one

    Can not show immediately another HUD after dismissing previous one

    The below code is not showing the Second HUD.

    ProgressHUD.show("First Hud...",interaction: false) DispatchQueue.main.asyncAfter(deadline: .now()+4.0) { ProgressHUD.dismiss() ProgressHUD.show("Second Hud...",interaction: false) DispatchQueue.main.asyncAfter(deadline: .now()+4.0) { ProgressHUD.dismiss() } }

    opened by kishanios123 2
  • Error installing ProgressHUD

    Error installing ProgressHUD

    [!] Error installing ProgressHUD [!] /usr/bin/git clone https://github.com/relatedcode/ProgressHUD.git /var/folders/2t/yqz6yn6d7bj0j__lpc6f4m440000gn/T/d20200902-86706-vvv43c --template= --single-branch --depth 1 --branch v2.51

    opened by dalugoda 2
  •  the message disappear unfriendly

    the message disappear unfriendly

    When I clicked button to show message many times in a short time ,the message will disappear unfriendly ,because showing or hiding a message is used a shared instance.

    opened by hanxuejian 2
  • Properly center HUD on iPad in split screen

    Properly center HUD on iPad in split screen

    This PR fixes an issue where the HUD didn't appear correctly centered on iPad when in split screen. Tested on iOS 13 and 14.

    I also added support for split screen on iPad in the demo app by adding support for Device orientation: UIInterfaceOrientationPortraitUpsideDown.

    Screen Shot 2021-04-05 at 3 07 41 PM
    opened by massimobio 1
  • Misaligned HUD on iPad in split screen

    Misaligned HUD on iPad in split screen

    On iPad in split screen the HUD appears centered in the device's screen rather than in the app window.

    Screen Shot 2021-04-04 at 3 24 13 PM

    To enable split screen in the demo app all 4 device orientations should be enabled: Screen Shot 2021-04-04 at 3 26 42 PM

    opened by massimobio 1
  • Shared is unavailable in application extensions for ios

    Shared is unavailable in application extensions for ios

    When I insert this HUD in my project, I get the errors "'shared' is unavailable in application extensions for iOS" on lines 338 and 550 in the ProgressHUD.swift file.

    image
    opened by vicajilau 1
  • completion handler on hide

    completion handler on hide

    Great work, thanks for making it available! This thing is sweet.

    One minor feature request. It would be nice to get a callback after the if hide timer, since I typically have to take some action on my end. For example, I want to show "Success!" for 1.5 seconds and then dismiss my modal vc. The builtin hiding delay is thoughtful but I can't take advantage of it without a completion handler.

    Typical flow:

    1. show hud for at least one second even if network request is quite fast
    2. show "Success!" for 1.5 seconds to give user a chance to read
    3. hide hud & dismiss view controller
    opened by gurgeous 1
  • Get Lastest version

    Get Lastest version

    HI, how can i get the latest version for this 'ProgressHUD' pod ? already pod installs and delete the podfile.lock and still got the old version, ProgressHUD (2.51) Please help

    opened by yosuu22 1
  • Not showing on some iOS 13 versions

    Not showing on some iOS 13 versions

    I'm having a weird bug. The ProgressHUD is not showing on iOS versions like 13.3.1 or 13.7 but it works OK in iOS 13.0 or newer versions like 14 15 and 16.

    Has anyone experienced something similar?

    Running Xcode 13.4.1 with the latest version of ProgressHUD (13.6)

    opened by TobiasRuano 1
  • Add Haptics support

    Add Haptics support

    This PR adds

    • default success and error haptic feedback
    • the ability to pass in any haptic feedback type (for example, you could pass .warning when displaying ⚠️)
    • the ability to disable haptics if you don't want them for some reason
    • disable/enable haptics functionality to the test app
    opened by getaaron 0
  • ProgressHUD not visible when call .show() method

    ProgressHUD not visible when call .show() method

    ProgressHUD view is not on top it is showed in between: UIWindowScene (Foreground active) -> UIWindow -> UIView -> ProgressHUD -> TopViewController

    But when I cal show method second time it is showed corretly

    opened by TopIvanAbramov 1
Releases(13.6.2)
Owner
Related Code
Mobile Application Development. Scalable Architecture Design. Custom Backend Development. Application Security. Performance Engineering. Analytics. Maintenance.
Related Code
This is a beauful hud view for iPhone & iPad

WSProgressHUD This is a beauful hud view for iPhone & iPad Usage To Download the project. Run the WSProgressHUD.xcodeproj in the demo directory. [

Wilson 583 Dec 6, 2022
Simple HUD.

VHUD Simple HUD. VHUD is inspired by PKHUD. Example Show import VHUD func example() { var content = VHUDContent(.loop(3.0)) content.loadingText =

Airin 138 Jan 24, 2021
Simple Swift Progress HUD

MKProgress An iOS Simple Swift Progress HUD Requirements iOS 9.0+ Swift 3.0+ Xcode 8.0+ Installation MKProgress is only available via CocoaPods: pod '

Muhammad Kamran 143 Dec 23, 2022
A lightweight and awesome loading Activity Indicator for your iOS app.

BPCircleActivityIndicator BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on

Ben.Park 46 Aug 12, 2022
A view class for iOS that makes uploading easy and beautiful.

SVUploader A view class for iOS that makes uploading easy and beautiful. Demo SVUploader is fully customizable - check out 2 demos. Installation Just

Kiran 79 Apr 18, 2022
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

ArLupin 940 Dec 22, 2022
💀 An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.

Skeleton is an easy way to create sliding CAGradientLayer animations! It works great for creating skeleton screens: ??‍?? Usage The entire library com

Gonzalo Nuñez 668 Nov 2, 2022
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

SwiftSpinner SwiftSpinner is an extra beautiful activity indicator with plain and bold style. It uses dynamic blur and translucency to overlay the cur

Marin Todorov 2.1k Dec 19, 2022
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

Yonat Sharon 340 Dec 16, 2022
A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

BPBlockActivityIndicator BPBlockActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iO

Ben.Park 43 Nov 6, 2021
UIProgressView replacement with an highly and fully customizable animated progress bar in pure Core Graphics

The YLProgressBar is an UIProgressView replacement with a highly and fully customizable animated progress bar in pure Core Graphics. It has been imple

Yannick Loriot 1.3k Jan 5, 2023
Simple and powerful animated progress bar with dots

Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 8.0+ Swift 3.0+ Installatio

Nikola Corlija 42 Dec 5, 2022
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features • Guides • Installation • Usage • Miscellaneous • Contributing ?? README is available in other languages: ???? . ???? . ???? . ???? . ???? To

Juanpe Catalán 11.7k Jan 8, 2023
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again

StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

Idle Hands Apps 160 Nov 2, 2022
The easiest way to handle a simple full screen activity indicator in iOS. Written in Swift.

LLSpinner An easy way to handle full screen activity indicator. Easy to use Get Started // Show spinner LLSpinner.spin() // Hide spinner LLSpinner.st

Aleph Retamal 36 Dec 9, 2021
Flexible Stepped Progress Bar for IOS

FlexibleSteppedProgressBar This is a stepped progress bar for IOS. The base code is derived from ABSteppedProgressBar. Most of the design is customisa

Amrata Baghel 549 Jan 6, 2023
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

Firdavs Khaydarov 161 Dec 5, 2022
A beautiful and easy-to-use progress HUD for your iOS.

日本語 KRProgressHUD is a beautiful and easy-to-use progress HUD for your iOS written by Swift. KRActivityIndicatorView is used for loading view. Feature

K.R.Impedance 634 Dec 5, 2022
A clean and lightweight progress HUD based on SVProgressHUD, converted to Swift with the help of Swiftify.

IHProgressHUD IHProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. IHProgressHUD is based on

Swiftify 202 Dec 22, 2022
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.

wobbly See Wobbly in action (examples) Add a drop of honey ?? to your project wobbly has a bunch of cool, fun, and easy to use iOS animations for you

Sagaya Abdulhafeez 150 Dec 23, 2021