- August 12, 2025
- Mins Read
BPBlockActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iOS.
iOS 8.0
Swift 3.2
BPBlockActivityIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod “BPBlockActivityIndicator”
Simply add the following line to your Cartfile:
github “ppth0608/BPBlockActivityIndicator”
Copy the folder Source/
to your project
Using BPBlockActivityIndicator isn’t difficult at all. There are two actual ways of implementing it in your project:
First, add a UIView to your Storyboard and set the custom class (You can set custom classes in Identity Inspector) as it shown in the picture below:
Then, add the corresponding Outlet in to your code:
@IBOutlet weak var blockIndicator: BPBlockActivityIndicator!
If you would like to setup BPBlockActivityIndicator manually, you have to do the following:
var blockIndicatorindicator: BPBlockActivityIndicator!
override func viewDidLoad() {
super.viewDidLoad()
// initialize BPBlockActivityIndicator programmatically
blockIndicatorindicator = BPBlockActivityIndicator(frame: CGRect(x: 0, y: 0, width: 40, height: 40))
view.addSubview(blockIndicatorindicator)
}
You can easily animate and stop animations like so:
@IBAction func startAnimate(_ sender: Any) {
blockIndicator.animate()
}
@IBAction func stopAnimate(_ sender: Any) {
blockIndicator.stop()
}
If you want to setup animation speed or the color of blocks (if using a storyboard) you can set the properties in the Identity Inspector as it shown in the picture below:
Or (if using code), you can call methods as shown in the code below:
blockIndicatorindicator = BPBlockActivityIndicator(frame: CGRect(x: 30, y: 30, width: 40, height: 40))
.movementSpeed(0.2)
.blockColor(.cyan)
view.addSubview(blockIndicatorindicator)
Default settings are shown below:
Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSpeech Examples Features Installation Getting Started ...
Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 14.0 Installation ...
SlidingRuler is a Swift package containing a SwiftUI control that acts like an linear infinite slider or a finite, more precise ...
SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and ...