CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

SWActivityIndicatorView 2.0.0

SWActivityIndicatorView 2.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Sarun Wongpatcharapakorn.



  • By
  • Sarun Wongpatcharapakorn

SWActivityIndicatorView

A simple flat activity indicator view.

alt tag

Installation

SWActivityIndicatorView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SWActivityIndicatorView"

You may also quickly try the SWActivityIndicatorView example project with

pod try SWActivityIndicatorView

Requirements

Requires iOS 8.0+ and ARC.

Usage

Basic usage

let activityIndicatorView = SWActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
self.view.addSubview(activityIndicatorView)
activityIndicatorView.startAnimating()

If you use Interface Builder, add a UIView to your interface and set Class to SWActivityIndicatorView.

Customization

You can use customize SWActivityIndicatorView via property

activityIndicatorView.lineWidth = 2
activityIndicatorView.autoStartAnimating = true
activityIndicatorView.hidesWhenStopped = false
activityIndicatorView.color = UIColor.lightGrayColor()

Author

Sarun Wongpatcharapakorn (@sarunw)

License

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