Home

Awesome

日本語

KRActivityIndicatorView

Version License Platform Download Carthage compatible CI Status

KRActivityIndicatorView is a simple and customizable activity indicator written in Swift.

You can add KRActivityIndicatorView from IB and code.

<img src="https://github.com/krimpedance/Resources/blob/master/KRActivityIndicatorView/demo.gif" height=400>

On HUD => https://github.com/krimpedance/KRProgressHUD

Features

Requirements

DEMO

To run the example project, clone the repo, and open KRActivityIndicatorViewDemo.xcodeproj from the DEMO directory.

or appetize.io

Installation

KRActivityIndicatorView is available through CocoaPods and Carthage. To install it, simply add the following line to your Podfile or Cartfile:

# CocoaPods
pod "KRActivityIndicatorView"
# Carthage
github "Krimpedance/KRActivityIndicatorView"

Usage

(see sample Xcode project in /Demo)

Usage is almost same as UIActivityIndicatorView.

Showing activity indicator

Show simple KRActivityIndicatorView.

let activityIndicator = KRActivityIndicatorView()
view.addSubview(activityIndicator)

With single color.

KRActivityIndicatorView(colors: [.green])

With gradation color.

KRActivityIndicatorView(colors: [.red, .orange, .white])

Start and stop animation.

activityIndicator.startAnimating()
activityIndicator.stopAnimating()

Customization

Current available params on IB:

Release Note

License

KRActivityIndicatorView is available under the MIT license. See the LICENSE file for more info.