Skip to content

Joker462/JLoadingHUD

Repository files navigation

JLoadingHUD

Introduction

JLoadingHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS.

Demo

alt_tag

Installation

Cocoapods

Add JLoadingHUD in your Podfile.

use_frameworks!

pod 'JLoadingHUD'

Then, run the following command.

$ pod install

Manual

Copy JLoadingHUD folder to your project. That's it.

Usage

Firstly, import JLoadingHUD

import JLoadingHUD

Control

Show loading

JLoadingHUD.shared.show()

Hide loading

JLoadingHUD.shared.hide()

Customization

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

License

The MIT License (MIT)

Copyright (c) 2019 Hung Thai (hungthai270893@gmail.com)