NVActivityIndicatorView README

The project's README from github.com/ninjaprox/NVActivityIndicatorView. As one markdown file: README.md.

NVActivityIndicatorView

Build Status Cocoapods Compatible Carthage Compatible

⚠️ Check out LoaderUI (ready to use with Swift Package Mananger supported) for SwiftUI implementation of this. 🎉

Introduction

NVActivityIndicatorView is a collection of awesome loading animations.

Demo

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

Installation

Cocoapods

Cocoapods is a dependency manager for Swift and Objective-C Cocoa projects. To use NVActivityIndicatorView with CocoaPods, add it in your Podfile.

pod 'NVActivityIndicatorView'

Carthage

Carthage is intended to be the simplest way to add frameworks to your Cocoa application. To use NVActivityIndicatorView with Carthage, add it in your Cartfile.

github "ninjaprox/NVActivityIndicatorView"

Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. To use NVActivityIndicatorView with Swift Package Manger, add it to dependencies in your Package.swift

dependencies: [
    .package(url: "https://github.com/ninjaprox/NVActivityIndicatorView.git")
]

Migration

Version 5.0.0 comes with breaking changes. Please refer to the release note for details.

Usage

Firstly, import NVActivityIndicatorView.

import NVActivityIndicatorView

Initialization

Then, there are two ways you can create NVActivityIndicatorView:

Note: Set Module to NVActivityIndicatorView.

NVActivityIndicatorView(frame: frame, type: type, color: color, padding: padding)

Control

Start animating.

activityIndicatorView.startAnimating()

Stop animating.

activityIndicatorView.stopAnimating()

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().

Documentation

https://nvactivityindicatorview.vinhis.me/

Acknowledgment

Thanks Connor Atherton for inspired Loaders.css and Danil Gontovnik for DGActivityIndicatorView.

License

The MIT License (MIT)

Copyright (c) 2016 Vinh Nguyen @ninjaprox

NVActivityIndicatorView (ninjaprox/NVActivityIndicatorView)

Searching Database…

What is this?NVActivityIndicatorView is a collection of over 30 ready-made loading animations for iOS apps, implemented as a drop-in UIView subclass.
Is it a UIKit view or a SwiftUI component?It is a UIKit-based component: a custom UIView subclass you drop into storyboards or create in code. For SwiftUI, the author points to a separate project called LoaderUI.
How do I add it to my project?Install via CocoaPods, Carthage, or the Swift Package Manager by adding it to your Podfile, Cartfile, or Package.swift dependencies respectively, then import NVActivityIndicatorView in your code.
Do I need any extra tools or libraries first?No external runtime dependencies beyond the package manager you choose (CocoaPods, Carthage, or SPM) to pull in the Swift framework.
Any pitfalls when upgrading or using it in Interface Builder?Version 5.0.0 introduced breaking changes, so check the release notes before upgrading. When used via storyboard, you must set the view's Module to NVActivityIndicatorView or it won't render correctly.
How do I start and stop an animation once it's set up?You call startAnimating() to begin and stopAnimating() to end, and can check isAnimating to query its state; any property changes must be made before calling startAnimating().
How many animation styles are included?32 distinct types, such as ballPulse, squareSpin, pacman, orbit, and circleStrokeSpin, each selectable by name.
Can I customize an animation's appearance in Interface Builder?Yes, all properties (color, type name, line width, etc.) can be set in the Attributes inspector tab, with the Type Name matching one of the predefined animation type values (case-insensitive).
Why would I use this instead of writing my own spinner?It bundles dozens of polished, pre-built loading animations (inspired by Loaders.css and DGActivityIndicatorView) so you don't have to design and animate your own loading indicator from scratch.
Creator
ninjaprox
Size
6.2 MB
Stars
10.7K
Age
11y
Commits · 90 Days