Customizable splash screen system wich can handle multiple splash navigation and display
To install SplashKit with CocoaPods, add the following lines to your Podfile
.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
pod 'SplashKit'
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate SplashKit into your Xcode project using Carthage, specify it in your Cartfile
:
github 'Digipolitan/splash-kit ~> 1.0
Run carthage update
to build the framework and drag the built SplashKit.framework
into your Xcode project.
First add the key environment into your Info.plist, check the RuntimeEnvironment repository.
<key>environment</key><string>staging</string>
Then create your splashscreen view (.xib) and make it inherit from DefaultSplashScreenViewController and set your splashscreen actions on AppDelegate.swift like follow
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = SplashNavigationController.newInstance(splashViewControllers:
DefaultSplashViewController(nibName: "AppDefaultSplashViewController", bundle: nil)) { [weak self] _ in
guard let target = self,
let window = target.window else {
return
}
UIView.transition(with: window, duration: 1, options: .transitionCrossDissolve, animations: {
UIView.setAnimationsEnabled(false)
window.rootViewController = UINavigationController(rootViewController: ViewController())
UIView.setAnimationsEnabled(true)
}, completion: nil)
}
window.makeKeyAndVisible()
self.window = window
return true
}
This is an example of using the default splash.
See CONTRIBUTING.md for more details!
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
SplashKit is licensed under the BSD 3-Clause license.