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
- Round indicator
- Indicator color can be customized
- iOS 10.0+
- Xcode 9.0+
- Swift 4.0+
To run the example project, clone the repo, and open KRActivityIndicatorViewDemo.xcodeproj from the DEMO directory.
or appetize.io
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"
(see sample Xcode project in /Demo)
Usage is almost same as UIActivityIndicatorView.
Show simple KRActivityIndicatorView.
let activityIndicator = KRActivityIndicatorView() view.addSubview(activityIndicator)
With single color.
KRActivityIndicatorView(style: .color(.green))
With gradation color.
KRActivityIndicatorView(style: .gradationColor(head: .red, tail: .orange))
activityIndicator.startAnimating()
activityIndicator.stopAnimating()
color(color)- The fill color of activity indicator is set tocolor.color(head: UIColor, tail: UIColor)- The fill color of activity indicator is gradated fromheadcolor totailcolor.
headColor- gradient head color.tailColor- gradient tail color.isLarge- Size of KRActivityIndicatorView. Default(off) size is 20x20, Large size is 50x50.animating- Animation of activity indicator when it's shownhidesWhenStopped- callssetHiddenwhen callstopAnimating()
I'm seeking bug reports and feature requests.
- 2.1.0 : Available at CocoaPods and Carthage with Xcode9 and Swift4.
- 2.0.2 : Fixed bag which don't change
headColorand 'tailColor'.
KRActivityIndicatorView is available under the MIT license. See the LICENSE file for more info.