Skip to content

ryansoy/SWActivityIndicatorView

 
 

Repository files navigation

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.

About

A simple flat activity indicator view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 57.1%
  • Swift 31.7%
  • Ruby 6.0%
  • Objective-C 5.2%