FanError / NVActivityIndicatorView

Collection of nice loading animations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NVActivityIndicatorView

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.

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

Manual

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

Usage

Firstly, import NVActivityIndicatorView

import NVActivityIndicatorView

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 40, white, .Pacman for size, color and type respectively.

  • Create with specified type, color and size

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

Any of the last three arguments can be omitted. If an argument is omitted it will use the default values which are 40, white, .Pacman for size, color and type 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 size
NVActivityIndicatorView(frame: frame, type: type, size: size)
  • specify only frame, size and color
NVActivityIndicatorView(frame: frame, size: size, color: color)
  • specify only frame and type
NVActivityIndicatorView(frame: frame, type: type)
  • specify only frame and color
NVActivityIndicatorView(frame: frame, color: color)
  • specify only frame and size
NVActivityIndicatorView(frame: frame, size: size)
  • specify only frame
NVActivityIndicatorView(frame: frame)

Acknowledgment

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

License

The MIT License (MIT)

Copyright (c) 2015 Nguyen Vinh @ninjaprox

About

Collection of nice loading animations

License:MIT License


Languages

Language:Swift 98.5%Language:Ruby 0.9%Language:Objective-C 0.7%