GithubHelp home page GithubHelp logo

shoaibcheema / nvactivityindicatorview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ninjaprox/nvactivityindicatorview

0.0 1.0 0.0 2.05 MB

Collection of nice loading animations

License: MIT License

Ruby 0.79% Swift 98.59% Objective-C 0.62%

nvactivityindicatorview's Introduction

NVActivityIndicatorView

Cocoapods Compatible Carthage Compatible

Introduction

NVActivityIndicatorView is a collection of nice loading animations.

This is original a fork from DGActivityIndicatorView, inspired by Loaders.css, written in Swift with full implementation of animations.

You can also find Objective-C version of this here.

Demo

alt tag

For first-hand experience, just open the project and run it.

Animation types

  1. BallPulse
  2. BallGridPulse
  3. BallClipRotate
  4. SquareSpin
  5. BallClipRotatePulse
  6. BallClipRotateMultiple
  7. BallPulseRise
  8. BallRotate
  9. CubeTransition
  10. BallZigZag
  11. BallZigZagDeflect
  12. BallTrianglePath
  13. BallScale
  14. LineScale
  15. LineScaleParty
  16. BallScaleMultiple
  17. BallPulseSync
  18. BallBeat
  19. LineScalePulseOut
  20. LineScalePulseOutRapid
  21. BallScaleRipple
  22. BallScaleRippleMultiple
  23. BallSpinFadeLoader
  24. LineSpinFadeLoader
  25. TriangleSkewSpin
  26. Pacman
  27. BallGridBeat
  28. SemiCircleSpin
  29. BallRotateChase

Installation

Cocoapods

Install Cocoapods if need be

$ gem install cocoapods

Add NVActivityIndicatorView in your Podfile

use_frameworks!

pod 'NVActivityIndicatorView'

Then, run the following command

$ pod install

Carthage

Install Carthage if need be

$ brew update
$ brew install carthage

Add NVActivityIndicatorView in your Cartfile

github "ninjaprox/NVActivityIndicatorView"

Run carthage to build the framework and drag the built NVActivityIndicatorView.framework into your Xcode project.

Manual

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

Usage

Firstly, import NVActivityIndicatorView

import NVActivityIndicatorView

Initialization

Then, there are multiple ways you can create NVActivityIndicatorView:

  • Use it in storyboard by changing class of any UIView to NVActivityIndicatorView This will use default values white, .Pacman, 0 for color, type and padding respectively.

  • Create with specified type, color and padding

NVActivityIndicatorView(frame: frame, type: type, color: color, padding: padding)

Any of the last three arguments can be omitted. If an argument is omitted it will use the default values which are white, .Pacman, 0 for color, type and padding respectively. Therefore, you can also create NVActivityIndicatorView using any of the following:

  • Specify only frame, type and color
NVActivityIndicatorView(frame: frame, type: type, color: color)
  • Specify only frame, type and padding
NVActivityIndicatorView(frame: frame, type: type, padding: padding)
  • Specify only frame, color and padding
NVActivityIndicatorView(frame: frame, color: color, padding: padding)
  • Specify only frame and type
NVActivityIndicatorView(frame: frame, type: type)
  • Specify only frame and color
NVActivityIndicatorView(frame: frame, color: color)
  • Specify only frame and padding
NVActivityIndicatorView(frame: frame, padding: padding)
  • Specify only frame
NVActivityIndicatorView(frame: frame)

Start/Stop animation

Start animation

activityIndicatorView.startAnimation()

Stop animation

activityIndicatorView.stopAnimation()

Change properties

If you use NVActivityIndicatorView in storyboard, you can change these properties in Attributes inspector tab of Utilities panel.

Use one of values (case-insensitive) in Animation types for Type Name.

Specify individual properties after initialization:

  • Specify type
activityIndicatorView.type = .LineScale
  • Specify color
activityIndicatorView.color = UIColor.redColor()

Specify whether activity indicator view should hide once stopped

activityIndicatorView.hidesWhenStopped = true

Get current status of animation

animation = activityIndicatorView.animating

Acknowledgment

Thanks Connor Atherton for great loaders and Danil Gontovnik for kick-start.

License

The MIT License (MIT)

Copyright (c) 2015 Nguyen Vinh @ninjaprox

nvactivityindicatorview's People

Contributors

gregttn avatar iaugux avatar marvinnazari avatar mnatsakanov avatar morizotter avatar ninjaprox avatar tako3 avatar winkelsdorf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.