Skip to content

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

License

Notifications You must be signed in to change notification settings

darshan2509/JustHUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JustHUD

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

JustHUD is an iOS drop-in class written in Swift that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread.

Installation

Download the JustHUD.swift file and add it into your project target.

Usage

  • Just the loader
JustHUD.shared.showInView(view: view)

  • Add title and footer text
JustHUD.shared.showInView(view: view, withHeader: "Loading", andFooter: "Please wait...")

  • Set color to the header, footer, loader or to the background view
JustHUD.setHeaderColor(color: UIColor.blue)
JustHUD.setFooterColor(color: UIColor.blue)
JustHUD.setLoaderColor(color: UIColor.blue)
JustHUD.setBackgroundColor(color: UIColor.white)

  • Customize: Set color the the background view and let header, footer and loader infer a contrast color
JustHUD.setBackgroundColor(color: UIColor.white, automaticTextColor: true)

  • Or show in a window
JustHUD.shared.showInWindow(window: window, withHeader: "Loading", andFooter: "Please wait...")
  • Hide the HUD
JustHUD.shared.hide()
  • Check if HUD is already being displayed
if JustHUD.shared.isActive {
    print("Currently showing HUD")
} else {
    print("HUD is currently hidden")
}

Contribution

Contribute to JustHUD

Code of Conduct

Contributor Covenant Code of Conduct

License

This code is distributed under the terms and conditions of the MIT license. The background image used in the demo was generated by lorempixel.com service.

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages