Skip to content

jianzhi2010/NVProgressHUD

Repository files navigation

NVProgressHUD

A simple progress HUD using NVActivityIndicatorView

image image image

Installation

Just drag the NVProgressHUD.swift file into your project, and install NVActivityIndicatorView

Usage

Firstly,import NVActivityIndicatorView

Then,you can use NVProgressHUD as simple as this:

self.navigationController?.view.showHUD(true)
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { () -> Void in
    // time-consuming task...
    self.navigationController?.view.hideHUD(true)
}

If you need to configure the HUD, you can do this:

 hud = NVProgressHUD(frame: self.navigationController!.view.frame)
 self.navigationController!.view.addSubview(hud)
 
 hud.labelText = "Loading"
 hud.show(true) 
 hud.hide(true, afterDelay: 2.0) // hide the HUD 

For more details, take a look at the demo project.

About

A simple progress HUD using NVActivityIndicatorView

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published