A Splash view that animates and reveals its content, inspired by Twitter splash

Overview

Banner

Build Status codecov.io CocoaPods Compatible Carthage compatible Awesome Language GitHub license

RevealingSplashView

A Splash view that animates and reveals its content, inspired by the Twitter splash.

RevealingSplashView

⭐ Features

  • Customizable reveal icon image.
  • Customizable icon image color.
  • Customizable icon image size.
  • Customizable background color.
  • Customizable animation duration.
  • Customizable animation delay.
  • Several animation to choose from.
  • Easy to use πŸ˜‰ .

:octocat: Installation

Get RevealingSplashView on CocoaPods, just add pod 'RevealingSplashView' to your Podfile and then run pod install. You can also add the github to your Carthage file.

If you use Carthage you can just install it by adding github "PiXeL16/RevealingSplashView" to your Carthage file.

Using Swift 2.3?

If you are using Swift 2.3, please use the 0.0.6 release.

🀘 Usage

Video Tutorial

Rebeloper created a nice Video Tutorial where you can also learn how to use this control!. You can also follow the docs below

Usage is pretty easy, just initialize your RevealingSplashView in your entry ViewController and in your viewDidLoad() function add it to your view. Then call startAnimation():

import RevealingSplashView

override func viewDidLoad() {
        super.viewDidLoad()

        //Initialize a revealing Splash with with the iconImage, the initial size and the background color
        let revealingSplashView = RevealingSplashView(iconImage: UIImage(named: "twitterLogo")!,iconInitialSize: CGSize(width: 70, height: 70), backgroundColor: UIColor(red:0.11, green:0.56, blue:0.95, alpha:1.0))

        //Adds the revealing splash view as a sub view
        self.view.addSubview(revealingSplashView)

        //Starts animation
        revealingSplashView.startAnimation(){
            print("Completed")
        }

    }

Ideally your iconInitialSize should match the size of the icon in your LaunchScreen.storyboard.

So it you set your constrains in your LaunchScreen.storyboard to be 80 height and 80 width you should set the same size as the initial size of the RevealingSplashView

Custom Icon Color

You are also able to change the color of your iconImage.

import RevealingSplashView

override func viewDidLoad() {
        super.viewDidLoad()
        
        //Initialize a revealing Splash with with the iconImage, the initial size and the background color
        let revealingSplashView = RevealingSplashView(iconImage: UIImage(named: "twitterLogo")!,iconInitialSize: CGSize(width: 70, height: 70), backgroundColor: UIColor(red:0.11, green:0.56, blue:0.95, alpha:1.0))

        revealingSplashView.useCustomIconColor = true
        revealingSplashView.iconColor = UIColor.red

        //Adds the revealing splash view as a sub view
        self.view.addSubview(revealingSplashView)

        //Starts animation
        revealingSplashView.startAnimation(){
            print("Completed")
        }

    }

This will change the actual icon color to red before the animation.

Custom Background Image

You are also able to change the background image of your backgroundImage.

import RevealingSplashView

override func viewDidLoad() {
        super.viewDidLoad()
        
        //Initialize a revealing Splash with with the iconImage, the initial size and the background color
        let revealingSplashView = RevealingSplashView(iconImage: UIImage(named: "twitterLogo")!, iconInitialSize: CGSize(width: 70, height: 70), backgroundImage: UIImage(named: "BackgroundImage")!)

        revealingSplashView.useCustomIconColor = false
        revealingSplashView.iconColor = UIColor.red

        //Adds the revealing splash view as a sub view
        self.view.addSubview(revealingSplashView)

        //Starts animation
        revealingSplashView.startAnimation(){
            print("Completed")
        }

    }

Using NavigationBar or TabBar?

If you are using a NavigationBar or TabBar as your entry view controller, chances are that the animation will look offset by some pixels. There are a couple of options here: Instead of adding the RevealingSplashView to your ViewController, you can add it to your window.

let window = UIApplication.sharedApplication().keyWindow
window?.addSubview(revealingSplashView)

You can also create another entry view controller. Then add the RevealingSplashView to that ViewController instead of the one with the NavigationBar or TabBar. Then after the animation of the RevealingSplashView ends you can transition to your NavigationViewController.

πŸ‘ Animations Types

There are several animations to choose from just set the animationType property of the RevealingSplashView

Twitter

Its the default animation that Twitter use for their app. If animationType is not set it will default to this one.

RevealingSplashView

HeartBeat

HeartBeat like animation, unlike the other animations, this special animation allows you to continue to animate until a function its called. This could be more entertaining to the user than having a quick launch and waiting on a spinning wheel if the app needs to fetch more data.

To use the Heartbeat animation you should startAnimation() as normal and then proceed with your network or background job. When you are done, just call

.heartAttack = true

And the splashview should dismiss.

HeartBeatAnimation

Rotate Out

Similar to the Twitter one but rotating while zooming out.

revealingSplashView.animationType = SplashAnimationType.rotateOut

RotateOutAnimation

Pop and Zoom Out

Pop the view a couple of times and zoom out.

revealingSplashView.animationType = SplashAnimationType.popAndZoomOut

RotateOutAnimation

Squeeze and Zoom Out

Squeeze the view and zoom out.

revealingSplashView.animationType = SplashAnimationType.squeezeAndZoomOut

RotateOutAnimation

Swing and Zoom Out

Swings the view and zoom out.

revealingSplashView.animationType = SplashAnimationType.swingAndZoomOut

RotateOutAnimation

Wobble and Zoom Out

Wobbles the view and zoom out.

revealingSplashView.animationType = SplashAnimationType.wobbleAndZoomOut

RotateOutAnimation

TODO

  • Better code coverage
  • More animations

πŸ‘½ Author

Chris Jimenez - http://code.chrisjimenez.net, @chrisjimeneznat

🍺 Donate

If you want to buy me a beer, you can donate to my coin addresses below:

BTC

1BeGBew4CBdLgUSmvoyiU1LrM99GpkXgkj

ETH

0xa59a3793E3Cb5f3B1AdE6887783D225EDf67192d

LTC

Ld6FB3Tqjf6B8iz9Gn9sMr7BnowAjSUXaV

License

RevealingSplashView is released under the MIT license. See LICENSE for details.

Issues
  • Update for Xcode 10.2 / Swift 5

    Update for Xcode 10.2 / Swift 5

    • bump version
    • bump .swift-version
    • update podspec
    • update Podfile
    • update project to recommended settings
    • convert framework to Swift 5
    • convert sample to Swift 5
    • fix warnings
    $ pod lib lint
    
     -> RevealingSplashView (0.8.0)
        - NOTE  | xcodebuild:  note: Using new build system
        - NOTE  | [iOS] xcodebuild:  note: Planning build
        - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    
    RevealingSplashView passed validation.
    
    opened by weakfl 10
  • Image is not loading at the time of the animation

    Image is not loading at the time of the animation

    This is my code its setup on the entry viewcontroller, and the launchscreen image has the same size image. override func viewDidLoad() { super.viewDidLoad()

        //Initialize a revealing Splash with with the iconImage, the initial size and the background color
        let revealingSplashView = RevealingSplashView(iconImage: UIImage(named:"TanksLogo")!, iconInitialSize: CGSizeMake(100, 100), backgroundColor: UIColor.init(netHex: 0xFDDD26))
    
        //Adds the revealing splash view as a sub view
        //revealingSplashView.iconImage = UIImage(named:"TanksLogo")!
        self.view.addSubview(revealingSplashView)
    
        revealingSplashView.duration = 0.9
    
        revealingSplashView.animationType = SplashAnimationType.PopAndZoomOut
    
        revealingSplashView.startAnimation(){
               //Stuff
        }
    
    opened by CarlosGzz 10
  • Carthage Task failed with exit code 65:

    Carthage Task failed with exit code 65:

    I cannot install it with Carthage:

    *** xcodebuild output can be found in /var/folders/ml/vwq3w1xn44d1j0lfbr77t6cw0000gn/T/carthage-xcodebuild.stHeqG.log *** Building scheme "RevealingSplashView" in RevealingSplashView.xcworkspace Build Failed Task failed with exit code 65:

    Is there a workaround to install it manually?

    help wanted 
    opened by artuan 6
  • will RevealingSplashView support carthage in future?

    will RevealingSplashView support carthage in future?

    hi, RevealingSplashView is great! but it seems dont support carthage

    opened by litt1e-p 5
  • Using RevealingSplashView with tabbar and navigation controller

    Using RevealingSplashView with tabbar and navigation controller

    Hi,

    My entry view is in a UINavigationController which is in a UITabBarController. When I add this to my entry view, the splash view eventually stays between the top navigation bar and bottom tabbar. I tried to set negative constraints on top and bottom, hoping to stretch the view but as the nature of tabbar and navigation bar is always to stay on top, this didn't work. I can maybe workaround this by having a top most view just for the splash view and initialize my tabs after the animation but do you know of any better way to accomplish this?

    Thank you.

    opened by batuhanc 5
  • App Crashing In Mobile Device SomeTimes, Here is the Crash Report In Swift 3

    App Crashing In Mobile Device SomeTimes, Here is the Crash Report In Swift 3

    Incident Identifier: 0534C147-FE98-4A3A-B687-113BC12F03D3 CrashReporter Key: 7734302ba6a56c065a6000407b53c517d64b4428 Hardware Model: iPhone8,2 Process: MQ [6321] Path: /private/var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/MQ Identifier: MQOFFICIAL.MQ Version: 1 (1.0.0.1) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: MQOFFICIAL.MQ [1933]

    Date/Time: 2017-06-08 19:03:47.9989 -0500 Launch Time: 2017-06-08 19:03:47.9273 -0500 OS Version: iPhone OS 10.3.1 (14E304) Report Version: 104

    Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Library not loaded: @rpath/RevealingSplashView.framework/RevealingSplashView | Referenced from: /var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/MQ | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/Frameworks/RevealingSplashView.framework/RevealingSplashView: mach-o, but wrong architecture | /private/var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/Frameworks/RevealingSplashView.framework/RevealingSplashView: mach-o, but wrong architecture | /private/var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/Frameworks/RevealingSplashView.framework/RevealingSplashView: mach-o, but wrong architecture Triggered by Thread: 0

    Filtered syslog: None found

    Thread 0 Crashed: 0 dyld 0x000000010023e8bc __abort_with_payload + 8 1 dyld 0x000000010023e268 abort_with_payload_wrapper_internal + 100 2 dyld 0x000000010023e294 fcntl + 0 3 dyld 0x000000010021c3bc dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 0 4 dyld 0x000000010021e9c4 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4416 5 dyld 0x0000000100219044 _dyld_start + 68

    Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000002 x2: 0x000000016fd2a620 x3: 0x00000000000000a1 x4: 0x000000016fd2a220 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000b10 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x6120676e6f727720 x11: 0x7463657469686372 x12: 0x2c6f2d6863616d20 x13: 0x6f72772074756220 x14: 0x696863726120676e x15: 0x0065727574636574 x16: 0x0000000000000209 x17: 0x0000000000000010 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016fd2a220 x21: 0x00000000000000a1 x22: 0x000000016fd2a620 x23: 0x0000000000000002 x24: 0x0000000000000006 x25: 0x000000010024d000 x26: 0x000000010024fbc8 x27: 0x000000010024d7ac x28: 0x000000010024d000 fp: 0x000000016fd2a1f0 lr: 0x000000010023e268 sp: 0x000000016fd2a1b0 pc: 0x000000010023e8bc cpsr: 0x00000000

    Binary Images: 0x1000d4000 - 0x100113fff MQ arm64 <8ef7633022db3129acca5a64976057ab> /var/containers/Bundle/Application/6E62E705-2A3E-4E37-AB1C-430FD465AC2F/MQ.app/MQ 0x100218000 - 0x10024bfff dyld arm64 /usr/lib/dyld

    EOF

    opened by zaidkhan0 5
  • Carthage and swift 3

    Carthage and swift 3

    The following build commands failed: PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/andresilvagomez/Library/Developer/Xcode/DerivedData/RevealingSplashView-gdkhobhohlmxddbnbzxirdhzohme/Build/Intermediates/RevealingSplashView.build/Release-iphoneos/RevealingSplashView.build/Script-E79891EEF61AFCD36E51FC4B.sh (1 failure) error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/andresilvagomez/CityTaxi/iOS/Carthage/Checkouts/RevealingSplashView/RevealingSplashView.xcworkspace -scheme RevealingSplashView -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65: ** BUILD FAILED **

    The following build commands failed: PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/andresilvagomez/Library/Developer/Xcode/DerivedData/RevealingSplashView-gdkhobhohlmxddbnbzxirdhzohme/Build/Intermediates/RevealingSplashView.build/Release-iphoneos/RevealingSplashView.build/Script-E79891EEF61AFCD36E51FC4B.sh

    opened by andresilvagomez 5
  • Swift 3.1 support

    Swift 3.1 support

    With xcode 8.3 and Swift 3.1 there is a build error:

    M_PI is deprecated.

    help wanted 
    opened by saldous 5
  • Support at least 8.2

    Support at least 8.2

    Hello,

    i like your framework. Great work. But I like to support my App for iOS 8.0 and above. But this Frameworks just wanted iOS 9.2 as oldest Software. Can you fix this? Thank you.

    opened by dungi 4
  • supportedInterfaceOrientations not supported

    supportedInterfaceOrientations not supported

    Hi,

    RevealingSplashView has some problems if you try to rotate the screen when launching. No one know how to fix it please?

    Thanks

    opened by ghost 4
  • heartBeat animation bug

    heartBeat animation bug

    I got an issue with heartBeat animation. My code is this:

    https://pastebin.com/4ZW8REfP

    The HeartBeat isn't stopping to beat, I've tried several times with .heartAttack = true or with the finishHeartBeatAnimation() but its not working properly.

    opened by M0in4 1
  • how to add loading indicator when waiting starAnimation ?

    how to add loading indicator when waiting starAnimation ?

    Can I add loading indicator before revealingSplashView.startAnimation() is called ? I am using RevealingSplashView when fetching data from Internet, I am using twitter style. but unfortunately if the request time is to long it will make the like freezing. so can I add something like UIActivityIndicatorView below the logo or somewhere else in RevealingSplashView?

    I am new in programming I am sorry if this is trivial

    opened by AgungLaksana 1
  • Control time of transition

    Control time of transition

    I would like to make the transition slower . How can i control the time of the transition of the splash view ??

    enhancement help wanted 
    opened by Mina-Gerges 1
Owner
Chris Jimenez
I build Apps for your phone and tablets, also πŸ“Έ, from πŸ‡¨πŸ‡·, in πŸ‡©πŸ‡ͺ
Chris Jimenez
Custom interactive view controller transition from one view to another view.

View2ViewTransition Simple framework for custom interactive viewController transition from one view to another view. Installation Carthage github "nar

Naruki Chigira 857 Nov 20, 2021
UIViewController extension to present view / view controller as bottom-half modal.

UIViewController extension to present view / view controller as bottom-half modal. Installation CocoaPods pod 'SemiModalViewController' Swift Package

muyexi 78 Oct 19, 2021
Custom presenters and better view controller presentation for iOS

PresenterKit Custom presenters and better view controller presentation for iOS Requirements Xcode 12.0+ Swift 5.3+ iOS 11.0+ SwiftLint Installation Co

Jesse Squires 562 Nov 6, 2021
Use PanGesture to dismiss view on UIViewController and UIView

PanSlip Use PanGesture to dismiss view on UIViewController and UIView. Introduction PanSlip to UIViewController left to right right to left top to bot

DongHee Kang 96 Aug 25, 2021
Custom animation transition for present modal view controller

ZFDragableModalTransition Usage - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { TaskDetailViewController *detailViewControl

Amornchai Kanokpullwad 2.5k Nov 6, 2021
AlertTransition is a extensible library for making view controller transitions, especially for alert transitions.

AlertTransition AlertTransition is a extensible library for making view controller transitions, especially for alert transitions. Overview AlertTransi

Loopeer 571 Nov 23, 2021
This component implements transition animation to crumble view-controller into tiny pieces.

StarWars Animation This component implements transition animation to crumble view-controller into tiny pieces. Check this project on dribbble. Also, r

Yalantis 3.7k Nov 19, 2021
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.

Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexibl

Sebastian Boldt 2.3k Nov 21, 2021
A custom modal transition that presents and dismiss a controller with an expanding bubble effect.

A custom modal transition that presents and dismiss a controller inside an expanding and shrinking bubble. Screenshot Usage Install through CocoaPods:

Andrea Mazzini 3.3k Nov 17, 2021
Screen transition with safe and clean code.

Presenter Screen transition with safe and clean code. With Presenter, you can… Assure that the ViewController's requirements are met, such as a ViewMo

Muukii 14 Aug 25, 2020
A library used to create beautiful animations and transitions for iOS.

Motion Welcome to Motion, a library used to create beautiful animations and transitions for views, layers, and view controllers. Photos Sample Take a

Cosmicmind 1.7k Nov 25, 2021
Appstore card animation transition. UICollectionView and UITableView card expand animated transition for iOS

appstore-card-transition Appstore card animation transition. UICollectionView and UITableView card expand animated transition. This library tries to a

appssemble 494 Nov 18, 2021
Simple and elegant Dropdown Transition

Simple and elegant dropdown transition for iOS Why? I needed to perform the dropdown transition in the app I was building and I've found many great li

Aidar Nugmanoff 57 Nov 16, 2021
A Splash view that animates and reveals its content, inspired by Twitter splash

RevealingSplashView A Splash view that animates and reveals its content, inspired by the Twitter splash. ⭐ Features Customizable reveal icon image. Cu

Chris Jimenez 1.2k Oct 21, 2021
A Splash view that animates and reveals its content, inspired by Twitter splash

RevealingSplashView A Splash view that animates and reveals its content, inspired by the Twitter splash. ⭐ Features Customizable reveal icon image. Cu

Chris Jimenez 1.2k Oct 21, 2021
Dhiraj Rajendra Jadhao 200 Feb 6, 2021
Twitter Kit is a native SDK to include Twitter content inside mobile apps.

Twitter will be discontinuing support for Twitter Kit on October 31, 2018. Read the blog post here. Twitter Kit for iOS Background Twitter Kit is a na

Twitter Archive 663 Nov 17, 2021
Twitter style Splash Screen View. Grows to reveal the Initial view behind

CBZSplashView [![CI Status](http://img.shields.io/travis/Callum Boddy/CBZSplashView.svg?style=flat)](https://travis-ci.org/Callum Boddy/CBZSplashView)

Callum Boddy 1.5k Nov 7, 2021
Twitter style Splash Screen View. Grows to reveal the Initial view behind

CBZSplashView [![CI Status](http://img.shields.io/travis/Callum Boddy/CBZSplashView.svg?style=flat)](https://travis-ci.org/Callum Boddy/CBZSplashView)

Callum Boddy 1.5k Nov 7, 2021
Create custom animated splash views similar to the ones in the Twitter, Uber and Ping iOS app.

SKSplashView SKSplashView is a simple class to create beautiful animated splash views for transitioning between views. Perfect as a launch screen whil

Sachin Kesiraju 478 Nov 15, 2021
Zoom transition that animates the entire view heirarchy. Used extensively in the Zola iOS application.

ZOZolaZoomTransition ZOZolaZoomTransition is a zoom transition that animates the entire view heirarchy. It is used extensively in the Zola iOS applica

Zola 915 Oct 28, 2021
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 42 Nov 10, 2021
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

twitter-text This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, tes

Twitter 2.6k Nov 22, 2021
Each step you take reveals a new horizon. You have taken the first step today.

The story Seeing the animations behind Paper, or the transitions behind Mail, being in a world of flat design and transitions, user interaction, app b

Ramon Gilabert 151 Aug 30, 2021
UIView subclass that bends its edges when its position changes.

AHKBendableView BendableView is a UIView subclass that bends its edges when its position change is animated. Internally, BendableView contains CAShape

Arek Holko 594 Oct 20, 2021
A UISwitch that infects its superview with its tint color.

UISwitch subclass that 'infects' the parent view with the onTintColor when the switch is turned on. Inspired by this Dribble by Ramotion. Screenshot I

Andrea Mazzini 342 Nov 17, 2021
PJFDataSource is a small library that provides a simple, clean architecture for your app to manage its data sources while providing a consistent user interface for common content states (i.e. loading, loaded, empty, and error).

PJFDataSource PJFDataSource is a small library that provides a simple, clean architecture for your app to manage its data sources while providing a co

Square 89 Apr 22, 2020
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift

SKPhotoBrowser Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift features Display one or more images by providi

keishi suzuki 2.3k Nov 24, 2021
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift

SKPhotoBrowser Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift features Display one or more images by providi

keishi suzuki 2.3k Nov 24, 2021