Swiftpack.co -  zevwings/ZVProgressHUD as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
ZVProgressHUD is a pure-swift and wieldy HUD.
.package(url: "https://github.com/zevwings/ZVProgressHUD.git", from: "3.0.4")


Carthage compatible CocoaPods Compatible Platform

ZVProgressHUD is a pure-swift and wieldy HUD.



  • iOS 8.0+
  • Swift 5.0


You can run this demo at Appetize



CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.

You can install Cocoapod with the following command

$ sudo gem install cocoapods

To integrate ZVProgressHUD into your project using CocoaPods, specify it into your Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

target 'TargetName' do
    pod 'ZVProgressHUD', '~> 2.0.0'

Then,install your dependencies with CocoaPods.

$ pod install


Carthage is intended to be the simplest way to add frameworks to your application.

You can install Carthage with Homebrew using following command:

$ brew update
$ brew install carthage

To integrate ZVProgressHUD into your project using Carthage, specify it into your Cartfile

github "zevwings/ZVProgressHUD" ~> 0.0.1

Then,build the framework with Carthage using carthage update and drag ZVProgressHUD.framework into your project.


The framework is under the Carthage/Build, and you should drag it into Target -> Genral -> Embedded Binaries


You can use import ProgressHUD when you needed to use ZVProgressHUD.

Showing a HUD

When you start a task, You can using following code:

// class method
// or you can use instance method 
let hud = ProgressHUD()

you can custom animation type, use following code:

/// the animation type, default is flat
public enum AnimationType {
	case flat		
	case native	

/// this code will modify global animation type.
ProgressHUD.shared.animationType = .flat

when you want modify the superview of ZVProgressHUD, use the following code:

// the HUD will show delay 0.0
ZVProgressHUD.show(with: "Loading", in: superview, delay: 0.0)

Dismiss a HUD

you can use a simple code to close HUD.

// class method
// or you can use instance method 

Showing a confirm

when you want show a comfirm infomation, use the following code:

ProgressHUD.shared.showError(with: "error")
ProgressHUD.shared.showSuccess(with: "success")
ProgressHUD.shared.showWarning(with: "warning")

Showing a custom image

you also can show a custom image, use the following code:

let image = UIImage(named: "smile")
// or
ProgressHUD.shared.showImage(image!, title: "smile everyday!")

Showing a custom animation

you can use the following code to custom a animation indicator.

var images = [UIImage](https://raw.github.com/zevwings/ZVProgressHUD/master/)
for index in 1 ... 3 {
    let image = UIImage(named: "loading_0\(index)")


Showing a progress

ProgressHUD.shared.showProgress(0.0, title: "Progress")

Custom logo

// set logoSize of HUD, CGSize(30, 30)
class var logoSize: CGSize 
// set logo image of HUD, default is nil
class var logo: UIImage 

Custom properties

// set displayStyle type of HUD, default is dark.
class var displayStyle: DisplayStyle 

// set mask type of HUD
class var maskType: MaskType 

// the cornerRadius of basic view   
class var cornerRadius: CGFloat 

// the offset of basic view
class var offset: UIOffset 

// the font of title label
class var font: UIFont 

// you can change the line width of indicator when animation type is `flat`
class var strokeWith: CGFloat 

// the size of indicator
class var indicatorSize: CGSize 

// the animation type, default is `flat`
class var animationType: IndicatorView.AnimationType 

Custom Insets of content

class var contentInsets: UIEdgeInsets 

class var titleEdgeInsets: UIEdgeInsets 

class var indicatorEdgeInsets: UIEdgeInsets 


you can add an observer to do something from hud's notifications.

extension NSNotification.Name {
	 // this hud did disappear
    public static let ProgressHUDReceivedTouchUpInsideEvent: Notification.Name

	 // this hud will appear
    public static let ProgressHUDWillAppear: Notification.Name

	 // this hud did appear
    public static let ProgressHUDDidAppear: Notification.Name

	 // this hud will disappear
    public static let ProgressHUDWillDisappear: Notification.Name

	 // this hud did disappear
    public static let ProgressHUDDidDisappear: Notification.Name


ZVProgressHUD distributed under the terms and conditions of the MIT License


Stars: 30
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API