Create simple and super customizable OnBoarding Views
With this tool you can create OnBoarding Views to show informations before the user actually see your app.
POD Installation:
pod 'SimpleOnBoarding', :git => 'https://github.com/leodegeus7/SimpleOnBoarding.git'
To use this tool you need to follow few steps:
- In your AppDelegate import the framework SimpleOnBoarding;
- Create a Json File with your information, upload it to a server or put it in your bundle. The structure of JSON file can be founded here;
- Create an object of type OnBoarding in your didFinishLaunchingWithOptions.
- Passing the working mode: .online or .offline
- Passing a config Json URL, this can be an URL(string: "http://") or a Bundle.main.url(forResource: "file", withExtension: "json")
- Passing a UIViewController to be the next controller in OnBoarding Flow
- Passing the working mode: .online or .offline
SimpleOnBoarding(mode: WorkingMode, configJsonURL: URL, whereNextViewControllerIs: UIViewController)
- If you use a Online JsonFile is required to use a LoadController, but if you use a offline data the Load screen is optional. If you want you can force the activatation and customize with the follow code:
onBoarding.showLoadingScreenWhenOffline(Bool, during: Int)
onBoarding.updateLoadingScreenView(image: UIImage, progressBarColor: UIColor,progressBarBackLoadingColor: UIColor)
- Just start the onBoarding Views with the function show().
onBoarding.show()
Simple OnBoarding enables you to create a customizable layout. You can use our default layout and personalize with your colors and fonts or create your from a xib file.
let layout = OnBoardingLayout()
layout.titleColor = UIColor()
layout.descriptionFont = UIFont()
layout.buttonBackgroundColor = UIColor()
layout.backgroundColor = UIColor()
let onBoarding = SimpleOnBoarding(mode: WorkingMode, configJsonURL: URL, layout: layout, whereNextViewControllerIs: nextController)
onBoarding.show()
Download xib template file from here, and customize with your style, take care to don't delete any component.
let layout = OnBoardingLayout(customNibName: "OnBoardingView", bundle: Bundle(for: AppDelegate.self))
let onBoarding = SimpleOnBoarding(mode: WorkingMode, configJsonURL: URL, layout: layout, whereNextViewControllerIs: nextController)
onBoarding.show()
You can create one layout to screen of OnBoarding. Just create the layouts and pass with an array to OnBoarding object:
let layout1 = OnBoardingLayout()
let layout2 = OnBoardingLayout()
let layout3 = OnBoardingLayout(customNibName: "OnBoardingView", bundle: Bundle(for: AppDelegate.self))
let onBoarding = SimpleOnBoarding(mode: WorkingMode, configJsonURL: URL, layout: [layout1,layout2,layout3], whereNextViewControllerIs: nextController)
onBoarding.show()
-
0.0.1
- First Commit
-
0.0.24
- Updated to Swift 4.2
-
0.0.25
- Fixed problems of communcation between controllers
Leonardo Alexandre de Geus – @leodegeus7 – leonardodegeus@gmail.com
See LICENSE
for more information.