All Projects → kuznetsovVladislav → KVSpinnerView

kuznetsovVladislav / KVSpinnerView

Licence: MIT license
KVSpinnerView is highly customizable progress HUD

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to KVSpinnerView

Jtmaterialspinner
An iOS material design spinner view
Stars: ✭ 127 (+243.24%)
Mutual labels:  loader, spinner, ios-animation
Text Spinners
Pure text, CSS only, font independent, inline loading indicators
Stars: ✭ 2,728 (+7272.97%)
Mutual labels:  loader, spinner
Spinners React
Lightweight SVG/CSS spinners for React
Stars: ✭ 254 (+586.49%)
Mutual labels:  loader, spinner
Mkloader
Beautiful and smooth custom loading views
Stars: ✭ 1,377 (+3621.62%)
Mutual labels:  view, loader
React Loading Overlay
Loading overlays with fade, spinner, message support.
Stars: ✭ 218 (+489.19%)
Mutual labels:  loader, spinner
Vue Element Loading
⏳ Loading inside a container or full screen for Vue.js
Stars: ✭ 234 (+532.43%)
Mutual labels:  loader, spinner
Dotsloaderview
Simple dots loader view
Stars: ✭ 63 (+70.27%)
Mutual labels:  view, loader
Vue Loaders
Vue + loaders.css
Stars: ✭ 127 (+243.24%)
Mutual labels:  loader, spinner
Instagramactivityindicator
Activity Indicator similar to Instagram's.
Stars: ✭ 138 (+272.97%)
Mutual labels:  view, spinner
Slidingsquareloaderview
Marvelous sliding square loader view
Stars: ✭ 166 (+348.65%)
Mutual labels:  view, loader
loading
Laravel package to add loading indicator to pages while page is loading.
Stars: ✭ 38 (+2.7%)
Mutual labels:  loader, spinner
Vue Wait
Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
Stars: ✭ 1,869 (+4951.35%)
Mutual labels:  loader, spinner
Ng Block Ui
Block UI Loader/Spinner for Angular
Stars: ✭ 135 (+264.86%)
Mutual labels:  loader, spinner
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (+543.24%)
Mutual labels:  loader, ios-animation
BSLoader
It's to show loading animations
Stars: ✭ 13 (-64.86%)
Mutual labels:  view, loader
Fiftyshadesof
An elegant context-care loading placeholder for Android
Stars: ✭ 1,110 (+2900%)
Mutual labels:  view, loader
Materialactivityindicator
Material Activity Indicator
Stars: ✭ 109 (+194.59%)
Mutual labels:  loader, spinner
Swiftloader
A simple and beautiful activity indicator written in Swift
Stars: ✭ 116 (+213.51%)
Mutual labels:  loader, spinner
Eclipseloading
🌞 日食加载动画
Stars: ✭ 114 (+208.11%)
Mutual labels:  view, loader
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-43.24%)
Mutual labels:  loader, spinner

KVSpinnerView

KVSpinnerView is highly customizable progress HUD with a possibility to show messages or progress while some work is being done. KVSpinnerView has several animation types which was written using CAAnimations.

alt text alt text

Installation

Cocoa Pods

Using CocoaPods is highly recommended way you should use to add KVSpinnerView to your project

  1. Add this line to your Podfile pod 'KVSpinnerView', '~> 1.0.2'

  2. Close .xcodeproj -> Open terminal -> Open project directory -> run pod install

  3. Import KVSpinnerView where needed (import KVSpinnerView)

Manual installation

  1. Download latest code version

  2. Copy KVSpinnerView directory into your project

Usage

You can use KVSpinnerView methods while some tasks are being done in background, some big tasks are loading, etc. To show KVSpinnerView on your screen you should use its static methods.

KVSpinnerView.show()
self.doSomeTask().response { (object) in
	DispatchQueue.main.async {
		KVSpinnerView.dismiss()
	}
}

You also can add status message while KVSpinnerView is being shown. Background rectangle of KVSpinning view will automatically expand regarding to message width.

KVSpinnerView.show(saying: "Hello")

Use this method to remove SKSpinnerView after several seconds.

KVSpinnerView.dismiss(after: 5.0)

There is two ways to add KVSpinner view to your screen:

  1. Use method KVSpinnerView.show() to add spinner to UIApplication's window. If you use this method then the spinner will be at screen untill you dismiss it.

  2. Use method KVSpinnerView.show(on: _) to add the spinner to a view you choose, e.g.:

class ViewController: UIViewController {
	override func viewDidLoad() {
        super.viewDidLoad()
		KVSpinnerView.show(on: self.view)
    }
}

To hanle a progress of current request you need to call 'KVSpinnerView.showProgress()' instead of showProgress() method and then you should call 'KVSpinnerView.handle(progress: progress)' method in downloadProgress handler:

KVSpinnerView.showProgress()
self.doSomeTask().downloadProgress { progress in
	DispatchQueue.main.async {
		KVSpinnerView.handle(progress: progress)
	}
	.response { response in
		DispatchQueue.main.async {
			KVSpinnerView.dismiss()
		}
	}
}

Customize

Also KVSpinnerView is highly customizable. You can customize it by changing KVSpinnerView.settings parameters, such as:

  • animationStyle - type of Spinner's animation. For now there are 2 variants: standart(default) and infinite

  • spinnerRadius- radius of KVSpinnerView. Background rectangle changes its size regarldess to this parameter

  • linesWidth - width of each animating line

  • linesCount - total count of KVSpinnerView animating lines

  • backgroundOpacity - opacity of background rectangle

  • tintColor - color of each animating line

  • backgroundRectColor - color of background rectangle

  • statusTextColor - color of status message text

  • minimumDismissDelay - KVSpinnerView will not be removed earlier than this parameter (in seconds)

  • animationDuration - duration of one spin of animating lines

  • fadeInDuration - duration of fade in of background rectangle

  • fadeOutDuration - duration of fade out of background rectangle

Screenshots

Purple

Gray

Purple

To do

  • Add several animation types
  • Add success and error animations with status messages

Licence

This code is distributed under the terms and conditions of the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].