Latest 1.1
License MIT
Platforms ios 8.0, requires ARC

Carthage compatible
CocoaPods Compatible

ZVProgressHUD is a pure-swift and wieldy HUD.



  • iOS 8.0+
  • Swift 3.0



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 ''
platform :ios, '8.0'

target 'TargetName' do
    pod 'ZVProgressHUD', :git => ''

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


Download this project, And drag ZVProgressHUD.xcodeproj into your own project.

In your target’s General tab, click the ’+’ button under Embedded Binaries

Select the ZVProgressHUD.framework to Add to your platform.



You can use online demo on Appetize


You can use import ZVProgressHUD when you needed to use ZVProgressHUD

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

Showing the HUD

When you start a task, You can using following code to show ZVProgressHUD .state(title: "Loading...", state: .indicator))

Dismiss the HUD


Showing the confirmation .state(title: "Error", state: .error)) .state(title: "Success", state: .success)) .state(title: "Warning", state: .warning))

Showing the custom image

let image = UIImage(named: "cost") image!)

let image = UIImage(named: "cost") .state(title: "Cost", state: .custom(image: image!)))

Showing the progress title, progress: progress)

Showing the custom view

let customView = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
customView.backgroundColor = UIColor.white
let label = UILabel(frame: CGRect(x: 0, y: 30, width: 100, height: 40 ))
label.textAlignment = .center
label.font = UIFont.systemFont(ofSize: 14.0)
label.textColor = UIColor(red: 215.0 / 255.0, green: 22.0 / 255.0, blue: 59.0 / 255.0, alpha: 1.0)
label.text = "custom view"
ZVProgressHUD.customInsets = .init(top: 10, left: 10, bottom: 10, right: 10) .custom(view: customView))

Custom HUD Properties

public static var displayStyle: ZVProgressHUD.DisplayStyle     

public static var maskType: ZVProgressHUD.MaskType

public static var titleInsets: UIEdgeInsets 

public static var stateInsets: UIEdgeInsets

public static var customInsets: UIEdgeInsets

public static var offset: CGPoint 

public static var font: UIFont 

public static var delay: TimeInterval 

/// The cornerRadius if half of the value when you show a pure-label
public static var cornerRadius: CGFloat


When ZVProgressHUD.maskType is not equal to .none, There will post a Notification named .ZVProgressHUDDidReceiveTouchEvent, you can do something with it.


ZVProgressHUD distributed under the terms and conditions of the MIT License

Latest podspec

    "name": "ZVProgressHUD",
    "version": "1.1",
    "summary": "A pure-swift and wieldy HUD",
    "description": "ZVProgressHUD a pure-swift and wieldy HUD",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "zevwings": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "1.1"
    "source_files": [
    "resources": "ZVProgressHUD/Resource.bundle",
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This