Skip to content

SWIFT : Dynamic Animation Paired with Blurring, Ideal for Splash Screens or Onboarding.

Notifications You must be signed in to change notification settings

codebreaker5163/LiveSplash

Repository files navigation

LiveSplash

Dynamic Animation Paired with Blurring, Ideal for Splash Screens or Onboarding. Completely customisable and easy to use!

Installation

Drag and drop LiveSplash.framework, to your project, and change the Embed option to 'Embed and Sign' as show below. image

Import in your ViewController, where you need to display it.

import LiveSplash

Usage

Here is a short simple code to use it in your project:

func addBlurredLiveView(){
    // Initialise object with - CGRect for the size of blurred dynaminc background, and UIImage to be used to create animation
    let splash = LiveSplash(size: self.view.frame, image: UIImage(named: "demoLiveSplash")!)
    // Call startAnimation, if you want the image to animate, to give live effect, Pass number of seonds duration to complete 360 rotation.
    splash.startAnimation(delayInSec:15.0)
    // Call addBlur, if you want to add blur layer to the view. Pass UIBlurEffect.Style (.light, .dark etc) and opacity(blurLevel: 1 means lowest)
    splash.addBlur(blurMode: .light,blurLevel: 3)
    // Add the generated view as Subview to desired UIView, or UIElement(TableCell etc.)
    self.view.addSubview(splash.animatedView())
    // Optionally send generated view to back, to make your other UIElemets visible and interactive
    self.view.sendSubviewToBack(splash.animatedView())
}

Functions Available

startAnimation(delayInSec: Double) - To start the animation with number of seconds to complete one rotation.
addBlur(blurMode: UIBlurEffect.Style, blurLevel: Int) - To add a Blurred layer, with BlurStyle and opacity(1 lowest).
stopAnimation() - To stop Animation at any time.

Demo

screen-recording-2023-09-05-at-74058-pm_39I875uD.mp4

About

SWIFT : Dynamic Animation Paired with Blurring, Ideal for Splash Screens or Onboarding.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages