Swiftpack.co - Package - ninjaprox/NVActivityIndicatorView

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:

  • By storyboard, changing class of any UIView to 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

Github

link
Stars: 9490

Dependencies

Used By

Total: 0

Releases

- 2020-10-09 12:48:57

  • Fix #319 (amendment)

- 2020-10-08 14:32:16

  • Fix #319

- 2020-08-16 12:17:44

  • Fix #314

- 2020-07-02 15:45:01

  • Deprecate NVActivityIndicatorViewable and NVActivityIndicatorPresenter
  • By default, NVActivityIndicatorView pod doesn't include NVActivityIndicatorViewable and NVActivityIndicatorPresenter, use NVActivityIndicatorView/Extended instead
  • The same applies for NVActivityIndicatorView and NVActivityIndicatorViewExtended when using Swift Package Manager
  • Drop support for Swift <4.2

- 2019-09-24 15:18:15

  • Add Swift Package Manager support (#290)

- 2019-04-03 16:04:23

  • Default nil fadeInAnimation and fadeOutAnimation (#264)
  • Swift 5 migration (#274)

- 2019-01-23 14:39:10

  • Fix #261

- 2019-01-21 14:39:36

  • New NVActivityIndicatorAnimationBallDoubleBounce animation (#258)
  • Unify product name (#260)

- 2018-12-29 14:46:43

  • Fix #251

- 2018-12-24 17:47:20

  • Add tvOS target (#248)

- 2018-12-12 15:33:13

  • Don’t start/stop animating if unnecessary (#239)
  • Specify Swift version in Podspec (#245)

- 2018-09-18 13:37:30

  • Fix #211
  • Swift 4.2 migration

4.3.0 - 2018-07-07 11:41:53

  • Handle starting while waiting to stop (#218)
  • UI blocker fade in/out animation (#219)

- 2018-05-08 15:22:12

  • Fix #213

- 2018-04-11 15:01:11

  • Refactor NVActivityIndicatorPresenter with state pattern
  • Expose isAnimating from NVActivityIndicatorPresenter and NVActivityIndicatorViewable (#204)
  • Fix tests

- 2017-12-18 14:54:53

  • Fix view in auto layout
  • Fix #173, #180

- 2017-12-18 14:54:37

  • Introduce message spacing
  • New circle stroke spin animation

- 2017-12-18 14:54:07

  • Fix #186, #189

- 2017-09-21 15:17:56

  • Update to Swift 4

- 2017-07-08 09:28:30

  • Support app extension ( #119)

- 2017-04-14 14:35:14

  • Fix #138

- 2017-03-31 13:17:44

  • Fix warnings due to deprecated API in Xcode 8.3 (#128)

- 2017-03-26 08:10:25

  • Fix #132

- 2017-03-01 13:46:53

  • Fix #123

- 2017-02-20 15:23:39

  • Fix #121
  • Fix setting message (#118)

- 2017-02-05 08:17:54

  • Fix constraint conflict in UI blocker

- 2017-01-31 14:09:34

  • Able to change text color in UI blocker
  • Fix UI blocker layer on orientation change

- 2017-01-14 15:49:58

  • Able to change UI blocker background color
  • Able to change message in UI blocker during displaying

- 2016-12-04 11:42:22

  • Optimize compile time
  • Update setting to Swift 3.0.1 (#89)
  • Add default message (#94)
  • Custom message font
  • Auto message width (#79)

- 2016-09-19 13:49:52

  • Support Xcode 8 and Swift 3