目录
目录README.md

SSSSOnboarding

A lightweight and simple swifty secure solution for onboarding which supports both Portrait and Landscape

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.git

Usage

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

Authors

See also the list of contributors who participated in this project.

关于
51.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号