A collection of awesome loading animations

License: MIT

Language: Swift

Keywords: animation, carthage, cocoapods, ios, ios-animation, ios-lib, ios-swift, ios-thirdparty, ios-ui, loader, loaders, loading-animations, swift, swift-library


Build Status Cocoapods Compatible Carthage Compatible Reviewed by Hound


NVActivityIndicatorView is a collection of awesome loading animations.

This is original a fork from DGActivityIndicatorView, inspired by Loaders.css, written in Swift with full implementation of animations, plus more.

You can also find Objective-C version of this here.


alt tag

For first-hand experience, just open the project and run it.

Animation types

Type Type Type Type
1. ballPulse 2. ballGridPulse 3. ballClipRotate 4. squareSpin
5. ballClipRotatePulse 6. ballClipRotateMultiple 7. ballPulseRise 8. ballRotate
9. cubeTransition 10. ballZigZag 11. ballZigZagDeflect 12. ballTrianglePath
13. ballScale 14. lineScale 15. lineScaleParty 16. ballScaleMultiple
17. ballPulseSync 18. ballBeat 19. lineScalePulseOut 20. lineScalePulseOutRapid
21. ballScaleRipple 22. ballScaleRippleMultiple 23. ballSpinFadeLoader 24. lineSpinFadeLoader
25. triangleSkewSpin 26. pacman 27. ballGridBeat 28. semiCircleSpin
29. ballRotateChase 30. orbit 31. audioEqualizer 32. circleStrokeSpin



Install Cocoapods if need be.

$ gem install cocoapods

Add NVActivityIndicatorView in your Podfile.


pod 'NVActivityIndicatorView'

Then, run the following command.

$ pod install


Install Carthage if need be.

$ brew update
$ brew install carthage

Add NVActivityIndicatorView in your Cartfile.

github "ninjaprox/NVActivityIndicatorView"

Run carthage to build the framework and drag the built NVActivityIndicatorView.framework into your Xcode project.

Note: You might encounter compile issue, if so please use carthage branch instead. Check issue #101 for more information.


Copy NVActivityIndicatorView folder to your project. That's it.

Note: Make sure that all files in NVActivityIndicatorView included in Compile Sources in Build Phases.

Note: If you encounter issues while uploading the app to iTunes Connect, remove the Info.plist file in NVActivityIndicatorView. Check issue #129 for more information.


Version 4.0.0

This version requires Xcode 9.0 and Swift 4.

Version 3.7.0

This version splits NVActivityIndicatorView pod to 2 subpods NVActivityIndicatorView/Presenter and NVActivityIndicatorView/AppExtension. There is no need to change pod NVActivityIndicatorView to pod NVActivityIndicatorView/Presenter since it will be installed by default if you use the main pod name.

However, if you want to use NVActivityIndicatorView in app extension, use pod NVActivityIndicatorView/AppExtension instead.

Note: Related issue #119.

Version 3.6.0

This version requires Xcode 8.3 and Swift 3.1.

Version 3.0

This version requires Xcode 8.0 and Swift 3.

  • NVActivityIndicatorView.startAnimation() and NVActivityIndicatorView.stopAnimation() are deleted. Use NVActivityIndicatorView.startAnimating() and NVActivityIndicatorView.stopAnimating() instead.
  • UIViewController.startActivityAnimating() and UIViewController.stopActivityAnimating() are deleted. Use UIViewController.startAnimating() and UIViewController.stopAnimating() instead.

Version 2.0

This version continues to spport Xcode 7.0 and Swift 2.2 and earlier. For Swift 2.3 support, use swift2.3 branch instead.

pod 'NVActivityIndicatorView', :git => '', :branch => 'swift2.3'


Firstly, import NVActivityIndicatorView.

import NVActivityIndicatorView


Then, there are two ways you can create NVActivityIndicatorView:

  • By storyboard, changing class of any UIView to NVActivityIndicatorView.

Note: Set Module to NVActivityIndicatorView.

  • By code, using initializer. All parameters other than frame are optional and NVActivityIndicatorView.DEFAULT_* are used as default values.
NVActivityIndicatorView(frame: frame, type: type, color: color, padding: padding)


Start animating.


Stop animating.


Determine if it is animating.

animating = activityIndicatorView.isAnimating

Change properties

In storyboard, you can change all properties in Attributes inspector tab of Utilities panel.

Note: Use one of values (case-insensitive) in Animation types for Type Name.

All properties are public so you can change them after initializing.

Note: All changes must be made before calling startAnimating().

UI blocker

By conforming NVActivityIndicatorViewable protocol, you can use NVActivityIndicatorView as UI blocker for UIViewController.

class ViewController: UIViewController, NVActivityIndicatorViewable { }

Start animating.

startAnimating(size, message) // plus other parameters as in initializer.

Stop animating.


Check if it is animating.

animating = isAnimating

Or you can use NVActivityIndicatorPresenter to display UI blocker anywhere.

Start animating.

let activityData = ActivityData()


Note: Check documentation for detail of ActivityData.

Stop animating.


Change message.


Check if it is animating.

animating = NVActivityIndicatorPresenter.sharedInstance.isAnimating

Fade in/out animation

You have control over showing and hiding UI blocker animation.

startAnimating(fadeInAnimation: fadeInAnimation)

Check DEFAULT_FADE_IN_ANIMATION and DEFAULT_FADE_OUT_ANIMATION for examples of how to implement animation.


Thanks Connor Atherton for great loaders and Danil Gontovnik for kick-start.


The MIT License (MIT)

Copyright (c) 2016 Vinh Nguyen @ninjaprox

Project Statistics

Sourcerank 12
Repository Size 5.54 MB
Stars 7,922
Forks 861
Watchers 193
Open issues 6
Dependencies 2
Contributors 33
Tags 36
Last updated
Last pushed

Top Contributors See all

Vinh Nguyen Basem Emara Morita Naoki Grzegorz Tatarzyn Frederik Winkelsdorf Kevin Wong Marcel Dittmann Appsido deepankvora Marvin Nazari Garen Mnatsakanov Diego Ernst Andrew Walz Bennet van der Linden Tako Maksym Savisko Keisuke Kawamura John R Perry Jobins John Chris

Packages Referencing this Repo

A collection of awesome loading animations
Latest release 4.4.0 - Published - 7.92K stars
A collection of awesome loading animations
Latest release 4.4.0 - Published - 7.92K stars
A collection of awesome loading animations
Latest release 4.4.0 - Updated - 7.92K stars

Recent Tags See all

4.4.0 September 18, 2018
4.3.0 July 07, 2018
4.2.1 May 08, 2018
4.2.0 April 11, 2018
4.1.1 December 18, 2017
4.1.0 December 06, 2017
4.0.1 November 28, 2017
4.0.0 September 21, 2017
3.7.0 July 08, 2017
3.6.1 April 14, 2017
3.6.0 March 31, 2017
3.5.2 March 26, 2017
3.5.1 March 01, 2017
v3.5 February 20, 2017
v3.4 February 05, 2017

Interesting Forks See all

Collection of awesome loading animations
Swift - Updated - 2 stars
Collection of nice loading animations
Swift - MIT - Updated - 1 stars
Collection of nice loading animations
Swift - Updated - 1 stars
A collection of awesome loading animations
Swift - Updated - 1 stars
A collection of awesome loading animations
Swift - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2018-10-23 06:11:41 UTC

Login to resync this repository