Latest 0.1
Homepage https://github.com/ppth0608/BPCircleActivityIndicator
License MIT
Platforms ios 8.0
Authors

BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iOS.

Demo (no_interval, interval)

BPCircleActivityIndicator BPCircleActivityIndicator

Requirements

  • Deployment Target – iOS 8.0
  • Swift Version – Swift 3.1

Installation

CocoaPods

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

pod "BPCircleActivityIndicator"

Carthage

simply add the following line to your Cartfile:

github "ppth0608/BPCircleActivityIndicator"

Manual

Copy the folder Source/ to your project

Usage

Using BPCircleActivityIndicator isn’t difficult at all. There are two actual ways of implementing it in your project:

  • Storyboard setup
  • Manual setup

Storyboard Setup

First, you’re about to add 1 UIViews to your Storyboard and setup custom classes (You can set custom classes in Identity Inspector) as it shown in the picture below

(When you set custom class BPCircleActivityIndicator, you can see how view looks like cuz @IBDesignable)

BPCircleActivityIndicator

and, add Outlet in to your code

@IBOutlet weak var circleIndicator: BPCircleActivityIndicator!

Menual setup

if for some reason you’d like to setup BPCircleActivityIndicator manually you have to do the following step

var circleIndicator: BPCircleActivityIndicator!

override func viewDidLoad() {
    super.viewDidLoad()
    circleIndicator = BPCircleActivityIndicator(frame: CGRect(x: 0, y: 0, width: 30, height: 30))
    view.addSubview(circleIndicator)
}

Animate & Stop

You can easily animate and stop animation

@IBAction func startButtonTapped(sender: UIButton) {
    circleIndicator.animate()
}

@IBAction func stopButtonTapped(sender: UIButton) {
    circleIndicator.stop()
}

Customize

if you want to setup rotate speed or interval, you can call methods as it shown in the code below (Custom color is not suppoerted yet)

@IBAction func startButtonTapped(sender: UIButton) {
    circleIndicator
        .rotateSpeed(0.6)
        .interval(0.3)
        .animate()
}

Default setting is shown in below

  • Rotate Speed : 0.6
  • Interval : 0.3

TODO

  • [ ] Custom Color Support

Author

Ben.Park, [email protected]

Designed By

Suna.Shin, [email protected]

Contribute

always welcome :)
please, pull request for BPCircleActivityIndicator

License

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

Latest podspec

{
    "name": "BPCircleActivityIndicator",
    "version": "0.1",
    "summary": "Circle Activity Indicator that display the progress of an ongoing task on iOS",
    "description": "BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iOS.",
    "homepage": "https://github.com/ppth0608/BPCircleActivityIndicator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ben.Park": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ppth0608/BPCircleActivityIndicator.git",
        "tag": "0.1"
    },
    "source_files": "Sources/**/*",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This