Popularity
1.7
Stable
Activity
2.6
-
47
4
12

Description

KRActivityIndicatorView is a simple and customizable activity indicator written in Swift. You can add KRActivityIndicatorView from IB and code. On HUD => https://github.com/krimpedance/KRProgressHUD

Programming language: Swift
License: MIT License
Tags: Swift     UI     Progress HUD    
Latest version: v3.0.7

KRActivityIndicatorView alternatives and similar libraries

Based on the "UI" category.
Alternatively, view KRActivityIndicatorView alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of KRActivityIndicatorView or a related project?

Add another 'UI' Library

README

[日本語](./README_Ja.md)

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.

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

Features

  • Round indicator
  • Indicator color can be customized

Requirements

  • iOS 9.0+
  • Xcode 12.0+
  • Swift 5.3+

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:

  • headColor - gradient head color.
  • tailColor - gradient tail color.
  • numberOfDots - number of indicator dots.
  • duration - Duration for one rotation.
  • animating - Animation of activity indicator when it's shown
  • hidesWhenStopped - calls setHidden when call stopAnimating()

Release Note

  • 3.0.6 :
    • Update for Xcode 12

License

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


*Note that all licence references and agreements mentioned in the KRActivityIndicatorView README section above are relevant to that project's source code only.