Home

Awesome

RSLoadingView

Introduction

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

Requirements

Demo

SpinAlone - base Variant

<img src="./screenshots_normal.png" width="200">

SpinAlone - base Variant

<img src="./gif_normal.gif" width="200">

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

<img src="./gif_inout.gif" width="200">

Twins - base Variant

<img src="./gif_twins.gif" width="200">

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

EffectVariants
RSLoadingSpinAlonebase, inAndOut
RSLoadingTwinsbase
RSLoadingTriples(coming soon)

Customization

Loading View Related
FieldDefault Value
speedFactor1.0
mainColorUIColor.white
colorVariation0.0
sizeFactor1.0
spreadingFactor1.0
lifeSpanFactor1.0
variantKey""
HUB Related
FieldDefault Value
shouldDimBackgroundtrue
dimBackgroundColorUIColor.black.withAlphaComponent(0.6)
isBlockingtrue
shouldTapToDismissfalse
sizeInContainerCGSize(width: 180, height: 180)

Author

Roy Ng, roytornado@gmail.com @ 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.