besarism/SSSSOnboarding
Simple Swifty Secure Solution for Onboarding
Requirements
- iOS 11.0+
- Xcode 10.2+
- Swift 4+
Installation
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development.
Once you have your Swift package set up, adding SSSSOnboarding as a dependency is as easy as adding it to the dependencies value of your Package.swift.
dependencies: [
.package(url: "https://github.com/besarism/SSSSOnboarding.git", from: "0.0.2")
]Or if you go File > Swift Packages > Add Package Dependency, and add the link:
https://github.com/besarism/SSSSOnboarding.gitUsage
Basics
class ViewController: SSSSOnboardingViewController {
override func viewDidLoad() {
super.viewDidLoad()
pages = [
Page(image: "iphone", header: "iPhone", description: "The iPhone is a line of smartphones designed and marketed by Apple Inc."),
Page(image: "versus", header: "Versus", description: "Versus, often abbreviated v., v, vs., vs, or vrs. is a Latin word meaning 'against'."),
Page(image: "android_phone", header: "Android phone", description: "Android phone is a smartphone that runs the Android operating system.")
]
}
}More Options
class ViewController: SSSSOnboardingViewController {
override func viewDidLoad() {
super.viewDidLoad()
pages = [
Page(image: "iphone", header: "iPhone", description: "The iPhone is a line of smartphones designed and marketed by Apple Inc."),
Page(image: "versus", header: "Versus", description: "Versus, often abbreviated v., v, vs., vs, or vrs. is a Latin word meaning 'against'."),
Page(image: "android_phone", header: "Android phone", description: "Android phone is a smartphone that runs the Android operating system.")
]
//customization
themeColor = .systemBlue
fontName = "HelveticaNeue"
isLeftButtonHidden = true
isRightButtonHidden = false
rightButtonTitle = "Close"
prevButtonTitle = "PREV"
isActionButtonHidden = false
actionButtonTitle = "Start the test"
}
override func handleRightButton() {
//do something
}
override func handleActionButton() {
//do something
}
}Results
Portrait
[SSSSOnboarding Portrait]
Landscape
[SSSSOnboarding Landscape]
Package Metadata
Repository: besarism/SSSSOnboarding
Stars: 1
Forks: 0
Open issues: 1
Default branch: master
Primary language: swift
License: MIT
README: README.md