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.
🎞 | 🎞 | 🎞 |
---|---|---|
- Custom color
- Custom size
- Custom style
- Custom backgound (none, compact and full)
STYLE | STYLE |
---|---|
standardSpinning | standardPulsating |
standardSpinningDashed | standardTrailingContinuous |
standardTrailingDashed | standardEchoOutside |
standardEchoInside | standardRainbowFill |
tripleDotDance | iOSCircles |
iOS | ringFlare |
linearBars | linearBarWave |
linearBarWaggle | linearBarHop |
To run the example project, clone the repo, and run pod install
from the Example directory first.
- Xcode 11, Swift 5
BPActivityIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'BPActivityIndicator'
Simply drag & drop BPActivityIndicator.swift into your project.
In Storyboard, drag & drop a UIView object into the view controller. In view's Identity Inspector, change the Class and Module to BPActivityIndicator.
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()
Pouya Khansaryan, bluepixel.technologies@gmail.com
BPActivityIndicator is available under the MIT license. See the LICENSE file for more info.