Awesome loading animations using 3D engine written with Swift

Overview

RSLoadingView

Introduction

RSLoadingView bring your app to the new age of loading animations using 3D engine.

  • Written with Swift
  • Customizable
  • Using Apple's SceneKit with OpenGL
  • Include HUB feature: show full screen loading HUB with one line of code
  • Or use as standalone view
  • Configurable in interface builder

Requirements

  • Swift 4.0
  • iOS 9+

Demo

SpinAlone - base Variant

SpinAlone - base Variant

SpinAlone - inAndOut Variant; speedFactor = 2.0; lifeSpanFactor = 2.0; mainColor = UIColor.red

Twins - base Variant

Installation

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

pod "RSLoadingView"

Usage

import UIKit
import RSLoadingView

class ViewController: UIViewController {

  @IBAction func showLoadingHub() {
    let loadingView = RSLoadingView()
    loadingView.show(on: view)
  }

  @IBAction func showOnViewTwins() {
    let loadingView = RSLoadingView(effectType: RSLoadingView.Effect.twins)
    loadingView.show(on: view)
  }

  func hideLoadingHub() {
    RSLoadingView.hide(from: view)
  }

  @IBAction func showOnWindow() {
    let loadingView = RSLoadingView()
    loadingView.showOnKeyWindow()
  }

  func hideLoadingHubFromKeyWindow() {
    RSLoadingView.hideFromKeyWindow()
  }
  
}

Supported Effect

Effect Variants
RSLoadingSpinAlone base, inAndOut
RSLoadingTwins base
RSLoadingTriples (coming soon)

Customization

Loading View Related
Field Default Value
speedFactor 1.0
mainColor UIColor.white
colorVariation 0.0
sizeFactor 1.0
spreadingFactor 1.0
lifeSpanFactor 1.0
variantKey ""
HUB Related
Field Default Value
shouldDimBackground true
dimBackgroundColor UIColor.black.withAlphaComponent(0.6)
isBlocking true
shouldTapToDismiss false
sizeInContainer CGSize(width: 180, height: 180)

Author

Roy Ng, [email protected] @ Redso, https://www.redso.com.hk/

Linkedin: https://www.linkedin.com/in/roy-ng-19427735/

License

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

Comments
  • Does not work on iOS 12 beta 1

    Does not work on iOS 12 beta 1

    Hello,

    This project is really amazing. Unfortunately, it does not run well at all on iOS 12 beta 1: background is greyed out, but nothing spins.

    Good luck for that!

    Regards, Alexandre

    opened by AlexandreMinard 1
  • Rare critical crash

    Rare critical crash

    Hello!

    I think, you should consider either using optional with "loadingView" or apply some kind of nil

    if loadingView != nil{
            loadingView.removeFromSuperview()
        }
    

    In very rare cases, when you pop view controller without animation, while using "RSLoadingView" on both VCs your app can crash, becauseloadingView.removeFromSuperView() is called when loadingView is already nil.

    opened by AlexGee17 1
  • App crashed due to RSloading

    App crashed due to RSloading

    most of time if there is no activity indicator showing and you call hide, it cause app to crash, Some time it crashed at following method

     public func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {
      //logger.logDebug("updateAtTime \(time)")
    if isResized {
      prepareForResize()
      isResized = false
    } else {
      effect.update(at: time)
    }
         }
    

    specifically on following line effect.update(at: time) with EXC_BAD_ACCESS (code=1, address=0xbadd6678a819bf85)

    opened by maasim94 1
  • iOS 11 - loading view display in black color

    iOS 11 - loading view display in black color

    I have added a loader and set the main color as white color. But when I check with ios 11 it will show loader in black color. In ios 10 it is displaying in white color.

    opened by hardik99 1
  • Not working on IOS 15.3.1

    Not working on IOS 15.3.1

    Hello, from the screen shots, this project looks great, but it doesn't seem to work on the latest IOS version, Please can you update the library to be compatible? Thank you

    opened by kcochibili 0
  • Crash on Iphone 5C version 10.3.3

    Crash on Iphone 5C version 10.3.3

    public func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { //logger.logDebug("updateAtTime (time)") if isResized { prepareForResize() isResized = false } else { DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { self.effect.update(at: time) // Crash will be happen in this line } } }

    opened by KanhaiyaCMDL 0
  • Hi Roy

    Hi Roy

    When uploading to appstore "No suitable application records were found. Verify your bundle identifier 'org.cocoapods.RSLoadingView' is correct.". This error is coming. please resolve this issue asap..

    opened by mahesh789 0
  • UIView.bounds must be used from main thread only

    UIView.bounds must be used from main thread only

    Hi, i'have some issue using your component on Xcode 10 👍

    I have a new warning about Thread usage, in your method prepareForResize, the access of view.bounds is not forced on the mainThread

    Any idea ? Put Dispatch on the mainQueue ? (i'not quite sure about the performance)

    Best regards

    opened by leverdeterre 1
Owner
null
A lightweight and awesome loading Activity Indicator for your iOS app.

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

Ben.Park 46 Aug 12, 2022
A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

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

Ben.Park 43 Nov 6, 2021
💀 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

Gonzalo Nuñez 668 Nov 2, 2022
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 number of preset loading indicators created with SwiftUI

A number of preset loading indicators created with SwiftUI

Exyte 968 Jan 8, 2023
⌛️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
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
Completely customizable progress based loaders drawn using custom CGPaths written in Swift

FillableLoaders Completely customizable progress based loaders drawn using custom CGPaths written in Swift Waves Plain Spike Rounded Demo: Changelog:

Pol Quintana 2.1k Dec 31, 2022
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
A simple animated progress bar in Swift

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

Dhol Studio 445 Oct 13, 2022
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 '

Muhammad Kamran 143 Dec 23, 2022
A clean and lightweight progress HUD based on SVProgressHUD, converted to Swift with the help of Swiftify.

IHProgressHUD IHProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. IHProgressHUD is based on

Swiftify 202 Dec 22, 2022
IOS HUD Swift Library

JHProgressHUD JHProgressHUD is an iOS class written in Swift to display a translucent HUD with an indicator and/or labels while work is being done in

Harikrishnan T 79 Feb 27, 2021
A collection of awesome loading animations

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

Vinh Nguyen 10.3k Dec 27, 2022
NVActivityIndicatorView is a collection of awesome loading animations.

NVActivityIndicatorView is a collection of awesome loading animations.

Vinh Nguyen 10.3k Jan 5, 2023
A Swift library to take the power of UIView.animateWithDuration(_:, animations:...) to a whole new level - layers, springs, chain-able animations and mixing view and layer animations together!

ver 2.0 NB! Breaking changes in 2.0 - due to a lot of requests EasyAnimation does NOT automatically install itself when imported. You need to enable i

Marin Todorov 3k Dec 27, 2022
Imagine Engine - a fast, high performance Swift 2D game engine for Apple's platforms

Welcome to Imagine Engine, an ongoing project that aims to create a fast, high performance Swift 2D game engine for Apple's platforms that is also a j

John Sundell 1.8k Jan 3, 2023