Skip to content

BPActivityIndicator is a light-weight replacement for UIActivityIndicatorView based on Core Animation and Core Graphics. I can added to your project both programmatically and via Interface Builder.

License

Notifications You must be signed in to change notification settings

bluepixeltech/BPActivityIndicator

Repository files navigation

BPActivityIndicator

CI Status Version License Platform

Introduction

BPActivityIndicator is a light-weight customizable replacement for UIActivityIndicatorView based on Core Animation and Core Graphics. It can be added to your project both programmatically and via Interface Builder.

🎞 🎞 🎞

Features

  • Custom color
  • Custom size
  • Custom style
  • Custom backgound (none, compact and full)

Available styles

STYLE STYLE
standardSpinning standardPulsating
standardSpinningDashed standardTrailingContinuous
standardTrailingDashed standardEchoOutside
standardEchoInside standardRainbowFill
tripleDotDance iOSCircles
iOS ringFlare
linearBars linearBarWave
linearBarWaggle linearBarHop

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Xcode 11, Swift 5

Installation

  • Via Cocoapods

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

pod 'BPActivityIndicator'
  • Via source file

Simply drag & drop BPActivityIndicator.swift into your project.

Usage

  • Interface Builder

In Storyboard, drag & drop a UIView object into the view controller. In view's Identity Inspector, change the Class and Module to BPActivityIndicator.

  • Programmatically

First, import the module:

import BPActivityIndicator

Then, create an instance of BPActivityIndicator, and enjoy!

let ai = BPActivityIndicator(frame: CGRect(x: 50.0, y: 50.0, width: 170.0, height: 200.0))
ai.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(ai)
ai.activityIndicatorStyle = .tripleDotDance
ai.backgroundMode = .none
ai.backgroundColorStyle = .dark
ai.titleColor = .lightGray
ai.titleFont = UIFont.systemFont(ofSize: 18.0, weight: .light)
ai.title = "Please wait..."
ai.color = .lightGray
ai.lineWidth = 3.0
ai.startAnimating()

Author

Pouya Khansaryan, bluepixel.technologies@gmail.com

License

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

About

BPActivityIndicator is a light-weight replacement for UIActivityIndicatorView based on Core Animation and Core Graphics. I can added to your project both programmatically and via Interface Builder.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published