Latest 0.1.1
Homepage https://github.com/terrybu/TBVideoSplashScreen
License MIT
Platforms ios 8.0, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Terry Bu/TBVideoSplashScreen.svg?style=flat)](https://travis-ci.org/Terry Bu/TBVideoSplashScreen)
Version
License
Platform

This library is for any iOS Developer who wants to display a video as the splash screen instead of a boring static launch image.

In your AppDelegate.swift, import TBVideoSplashScreen and follow below code in didFinishLaunchingWithOptions.
The launch image you pass to makeAndPlayVideoSplashScreen is there for the best visual experience. Get the first frame of your video as a static image and set it as that image. While your video loads, that launch image will be the first thing shown to the user, giving the illusion that videoloading is slightly faster

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.

    TBVideoSplashScreen.makeAndPlayVideoSplashScreen(self, videoNameString: "splashScreen", withExtension: "mp4", launchImageString: "launchScreenImage")

    return true
}

Make sure you implement @objc moviePlayBackDidFinish() as callback method in the same file. This is the method that gets fired automatically upon video playback completion. Removing observer is just for safety

@objc
func moviePlayBackDidFinish() {
    //any custom logic for callback goes here
    let vc: UIViewController =  UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("ViewController") as! UIViewController
    let navCtrl = UINavigationController(rootViewController: vc)
    window?.rootViewController! = navCtrl
    NSNotificationCenter.defaultCenter().removeObserver(self)
}

Usage

To run the example project, clone repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod "TBVideoSplashScreen"

Author

Terry Bu, [email protected]

License

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

Latest podspec

{
    "name": "TBVideoSplashScreen",
    "version": "0.1.1",
    "summary": "TBVideoSplashScreen allows you to create a splash screen using a video file",
    "description": "                       Tired of using static images as the launch screen? Many prefer an animated splash screen but GIF files are quite a pain. Make a cool animation, export it out to video, use this library to show it and then let your app start normally at video finish.nn                       * Markdown format.n                       * Don't worry about the indent, we strip it!n",
    "homepage": "https://github.com/terrybu/TBVideoSplashScreen",
    "license": "MIT",
    "authors": {
        "Terry Bu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/terrybu/TBVideoSplashScreen.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "TBVideoSplashScreen": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This