JLoadingHUD
is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS.
Add JLoadingHUD
in your Podfile
.
use_frameworks!
pod 'JLoadingHUD'
Then, run the following command.
$ pod install
Copy JLoadingHUD
folder to your project. That's it.
Firstly, import JLoadingHUD
import JLoadingHUD
Show loading
JLoadingHUD.shared.show()
Hide loading
JLoadingHUD.shared.hide()
JLoadingHUD
can be customized via the following methods:
BACKGROUND <
Change background color
JLoadingHUD.shared.backgroundViewColor = UIColor.clear
LOADING VIEW <
JLoadingHUD.shared.loadingViewBackgroundColor = UIColor.red // Change loading view background color
JLoadingHUD.shared.loadingViewSize = 128.0 // Change loading view size
JLoadingHUD.shared.loadingViewCornerRadius = 16.0 // Change loading view corner radius
LOADING PROGRESS VIEW <
JLoadingHUD.shared.loadingStrokeWidth = 4.0 // Change loading progress size
JLoadingHUD.shared.loadingStrokeColor = UIColor.white // Change loading progress color
Types:
gradientCircle
circleSpin
circleSemi
circleScaleRipple
ballPulse
ballPulseQueue
ballPulseRipple
ballPulseOpacityRipple
ballPulseSync
JLoadingHUD.shared.progressLayerType = .circleSpin
The MIT License (MIT)
Copyright (c) 2019 Hung Thai (hungthai270893@gmail.com)