Onboarding provides a fluent user-interface for app onboarding experience.
Download the .zip from this repo and drag the /Sources/Onboarding
folder into your project.
Onboarding could be installed via Swift Package Manager. Open Xcode and go to File -> Add Packages..., search https://github.com/hengyu/Onboarding.git
, and add the package as one of your project's dependency.
Onboarding
is super easy to get started with.
Simply follow the usage in the example file.
import Onboarding
// 1. Prepare a set of tips items
let items: [TipsItem] = [
.init(title: "Intro", content: "This is the summary of the app", image: UIImage(named: "intro"))
]
// 2. Create a help page using the tips items
let helpPage: HelpPageViewController = .init(items: items)
// 3. Present the help page
presentingViewController.present(helpPage, animated: true)
We also provide HelpView
for buiding onboarding page in SwiftUI:
import Onboarding
public struct SettingsView: View {
@State var presentsOnboarding: Bool = false
let items: [TipsItem] = [
.init(title: "Intro", content: "This is the summary of the app", image: UIImage(named: "intro"))
]
public var body: some View {
VStack {
Button {
presentsOnboarding = true
} label: {
Text("Show onboarding")
}
}
.sheet(isPresented: $presentsOnboarding) {
HelpView(items: items)
}
}
}
Onboarding is released under the MIT License.
link |
Stars: 0 |
Last commit: 18 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics