A lightweight and easy-to-use HUD for iOS

ProgressHUD

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
}

GitHub

https://github.com/relatedcode/ProgressHUD