Swift 加载动画合集:NVActivityIndicatorView

jopen 9年前

NVActivityIndicatorView是一个漂亮的加载动画集合。

来自 DGActivityIndicatorView 的一个分支,源于 Loaders.css 采用Swift开发拥有动画完整实现。

Objective-C版本 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 yourPodfile

pod 'NVActivityIndicatorView'

Then, run the following command

$ pod install

Manual

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

Usage

There are 3 ways you can do:

  • Create with specified type and size 40, color white as default
NVActivityIndicatorView(frame: frame, type: type)
  • Create with specified type, color and size 40 as default
NVActivityIndicatorView(frame: frame, type: type, color: color)
  • Create with specified type, color, size
NVActivityIndicatorView(frame: frame, type: type, color: color, size: size)

项目主页:http://www.open-open.com/lib/view/home/1438236911175