Hpgradientloading

The library for loading activity with cool animation, blur and gradient, easy integrate and custom for iOS application.
Alternatives To Hpgradientloading
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Skeletonview11,743
24a month ago61August 11, 202247mitSwift
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Granim.js5,0914294 months ago10November 11, 201826mitJavaScript
Create fluid and interactive gradient animations with this small javascript library.
Pastel3,412
345 months ago9October 22, 201820mitSwift
🎨 Gradient animation effect like Instagram
Finestwebview Android2,275
2 years ago127Kotlin
Beautiful and customizable Android Activity that shows web pages within an app.
Kdcircularprogress973
352 years ago14September 22, 201628mitSwift
A circular progress view with gradients written in Swift
React Native Shimmer Placeholder9142362 months ago44September 24, 202118mitJavaScript
Placeholder/ Skeleton of React Native
Progressroundbutton846
4 years ago4apache-2.0Java
A DownloadProgressButton with Animation for Android
Gradientloadingbar767
35 months ago32May 10, 20222mitSwift
⌛️A customizable animated gradient loading bar.
Spark672
4 years agomitKotlin
🎨 An Android library to create gradient animation like Instagram&Spotify
Skeleton597
72 years ago6January 08, 2020mitSwift
💀 An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.
Alternatives To Hpgradientloading
Select To Compare


Alternative Project Comparisons
Readme

HPGradientLoading

Platform Language Version License Issues Build codecov

HPGradientLoading is awesome library for loading activity in iOS application

sample

Installation

CocoaPods

pod 'HPGradientLoading'

Manually

Copy the HPGradientLoading folder to your project.

Conguration

  • Enable blur background
var isBlurBackground: Bool
  • Enable blur loading activity
var isBlurLoadingActivity: Bool
  • Enable dismiss loading when tap
var isEnableDismissWhenTap: Bool
  • Size of loading activity
var sizeOfLoadingActivity: CGFloat
  • Gradient from color
var fromColor: UIColor
  • Gradient to color
var toColor: UIColor
  • Duration animation
var durationAnimation: TimeInterval
  • Blur color tinr loading activity
var blurColorTintActivity: UIColor
  • Blur color tint alpha for loading activity
var blurColorTintAlphaActivity: CGFloat
  • Blur radius loading activity
var blurRadiusActivity: CGFloat
  • Corner radius for loading activity
var cornerRadiusActivity: CGFloat
  • Gradient line width for loading activity
var gradientLineWidth: CGFloat
  • Blur color tint for background
var blurColorTintBackground: UIColor
  • Blur color tint alpha for background
var blurColorTintAlphaBackground: CGFloat
  • Blur radius background
var blurRadiusBackground: CGFloat
  • Color for title loading
var colorTitleLoading: UIColor
  • Font for title loading
var fontTitleLoading: UIFont
  • Color for processing loading
var colorTitleProcessing: UIColor
  • Font for title processing
var fontTitleProcessing: UIFont

Actions

  • Show loading
func showLoading(with title: String? = nil)
  • Show processing
func showProcessing(with loadingTitle: String? = nil, percent: CGFloat, duration: TimeInterval = 0.1)
  • Update processing
func updateProcessing(with percent: CGFloat, duration: TimeInterval = 0.1)
  • Dismiss loading
func dismiss()

Usage

Setup

Add import HPGradientLoading in your file

import UIKit
import HPGradientLoading

class ViewController: UIViewController {


    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        HPGradientLoading.shared.configation.isEnableDismissWhenTap = true
        HPGradientLoading.shared.configation.isBlurBackground = true
        HPGradientLoading.shared.configation.durationAnimation = 1.0
        HPGradientLoading.shared.configation.fontTitleLoading = UIFont.systemFont(ofSize: 20)

    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        HPGradientLoading.shared.dismiss()
    }


    // MARK: - Actions
    @IBAction private func showLoadingWithTitle(_ sender: Any) {
        HPGradientLoading.shared.showLoading(with: "Loading...")
    }

    @IBAction private func showLoadingWithEmptyTitle(_ sender: Any) {
        HPGradientLoading.shared.showLoading()
    }

    @IBAction private func showProcessing(_ sender: Any) {
        self.percent = 0
        HPGradientLoading.shared.showProcessing(with: "Loading...", percent: self.percent, duration: 0.15)
        self.timer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true, block: { (timer) in
            self.percent += 4
            self.percent = self.percent > 100 ? 100 : self.percent
            HPGradientLoading.shared.updateProcessing(with: self.percent)
            if self.percent == 100 {timer.invalidate()}
        })
    }
}

Requirements

Swift 5.0

iOS 10.0+

Xcode 10.2+

Contributing

Forks, patches and other feedback are welcome.

Creator

HPGradientLoading

Quang Hoang

Blog

License

HPGradientLoading is available under the MIT license. See the LICENSE file for more info.

Popular Gradient Projects
Popular Animation Projects
Popular User Interface Components Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Swift
Animation
Gradient
Radius
Tint
Loading Animations