Swift 加載動畫合集:NVActivityIndicatorView

jopen 9年前發布 | 13K 次閱讀 Apple Swift開發 NVActivityIndicatorView

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.baiduhome.net/lib/view/home/1438236911175

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!