Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Awesome loading animations using 3D engine written with Swift

License

NotificationsYou must be signed in to change notification settings

roytornado/RSLoadingView

Repository files navigation

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 throughCocoaPods. To installit, simply add the following line to your Podfile:

pod"RSLoadingView"

Usage

import UIKitimport RSLoadingViewclassViewController:UIViewController{@IBActionfunc showLoadingHub(){letloadingView=RSLoadingView()    loadingView.show(on: view)}@IBActionfunc showOnViewTwins(){letloadingView=RSLoadingView(effectType:RSLoadingView.Effect.twins)    loadingView.show(on: view)}func hideLoadingHub(){RSLoadingView.hide(from: view)}@IBActionfunc showOnWindow(){letloadingView=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.

About

Awesome loading animations using 3D engine written with Swift

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp