A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

Overview

BPBlockActivityIndicator

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

Demo

Requirements

  • Deployment Target - iOS 8.0
  • Swift Version - Swift 3.2

Installation

CocoaPods

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

pod "BPBlockActivityIndicator"

Carthage

Simply add the following line to your Cartfile:

github "ppth0608/BPBlockActivityIndicator"

Manual

Copy the folder Source/ to your project

Usage

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

  • Storyboard setup
  • Manual setup

Storyboard Setup

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:

2017-07-17 12 51 06

Then, add the corresponding Outlet in to your code:

@IBOutlet weak var blockIndicator: BPBlockActivityIndicator!

Manual setup

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)
}

Animate & Stop

You can easily animate and stop animations like so:

@IBAction func startAnimate(_ sender: Any) {
    blockIndicator.animate()
}

@IBAction func stopAnimate(_ sender: Any) {
    blockIndicator.stop()
}

Customize

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:

2017-07-17 12 51 51

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:

  • Animation Speed : 0.6
  • Color of blocks : Blue

Author

Ben.Park, [email protected]

Designed By

Suna.Shin, [email protected]

Contribute

Always welcome :) Please submit pull request to BPBlockActivityIndicator.

License

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

You might also like...
💀 An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.
💀 An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.

Skeleton is an easy way to create sliding CAGradientLayer animations! It works great for creating skeleton screens: 👩‍💻 Usage The entire library com

StatusBarOverlay will automatically show a
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again

StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

Material Linear Progress Bar for your iOS apps
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

Simple and powerful animated progress bar with dots

Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 8.0+ Swift 3.0+ Installatio

Simple HUD.
Simple HUD.

VHUD Simple HUD. VHUD is inspired by PKHUD. Example Show import VHUD func example() { var content = VHUDContent(.loop(3.0)) content.loadingText =

A simple animated progress bar in Swift
A simple animated progress bar in Swift

DSGradientProgressView Introduction DSGradientProgressView is a simple and customizable animated progress bar written in Swift. Inspired by GradientPr

Simple Swift Progress HUD

MKProgress An iOS Simple Swift Progress HUD Requirements iOS 9.0+ Swift 3.0+ Xcode 8.0+ Installation MKProgress is only available via CocoaPods: pod '

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

A view class for iOS that makes uploading easy and beautiful.
A view class for iOS that makes uploading easy and beautiful.

SVUploader A view class for iOS that makes uploading easy and beautiful. Demo SVUploader is fully customizable - check out 2 demos. Installation Just

Owner
Ben.Park
iOS Developer
Ben.Park
A beautiful activity indicator and modal alert written in Swift (originally developed for my app DoodleDoodle) Using blur effects, translucency, flat and bold design - all iOS 8 latest and greatest

SwiftSpinner SwiftSpinner is an extra beautiful activity indicator with plain and bold style. It uses dynamic blur and translucency to overlay the cur

Marin Todorov 2.1k Dec 19, 2022
The easiest way to handle a simple full screen activity indicator in iOS. Written in Swift.

LLSpinner An easy way to handle full screen activity indicator. Easy to use Get Started // Show spinner LLSpinner.spin() // Hide spinner LLSpinner.st

Aleph Retamal 36 Dec 9, 2021
NVActivityIndicatorView is a collection of awesome loading animations.

NVActivityIndicatorView is a collection of awesome loading animations.

Vinh Nguyen 10.3k Jan 5, 2023
Awesome loading animations using 3D engine written with Swift

RSLoadingView Introduction RSLoadingView bring your app to the new age of loading animations using 3D engine. Written with Swift Customizable Using Ap

null 419 Dec 16, 2022
Yet another task indicator

SendIndicator Yet another task indicator Requirements Installation Usage License Requirements iOS 8.0+ Swift 3.0+ Xcode 8.0+ Installation CocoaPods Co

Leonardo Cardoso 64 Aug 17, 2022
Show pleasant loading view for your users 😍

RHPlaceholder ?? Because traditional loading view like UIActivityIndicatorView or similar one are no longer so trendy (Facebook or Instagram apps are

Robert Herdzik 238 Nov 2, 2022
A number of preset loading indicators created with SwiftUI

A number of preset loading indicators created with SwiftUI

Exyte 968 Jan 8, 2023
A metaball loading written in Swift.

DBMetaballLoading Synopsis A metaball loading written in Swift. Special thanks to dodola's MetaballLoading, which is an android project. The animation

ChildhoodAndy 72 Jul 2, 2022
⌛️A customizable animated gradient loading bar.

GradientLoadingBar A customizable animated gradient loading bar. Inspired by iOS 7 Progress Bar from Codepen. Example To run the example project, clon

Felix M. 791 Dec 26, 2022
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

ArLupin 940 Dec 22, 2022