DTOnboarding
A macOS onboarding component
Install / Use
/learn @demianturner/DTOnboardingREADME
DTOnboarding
<a href="https://developer.apple.com/swift"><img alt="Swift5" src="https://img.shields.io/badge/language-Swift5-orange.svg"/></a>
<a href="https://swift.org/package-manager"><img alt="Swift Package Manager" src="https://img.shields.io/badge/SwiftPM-compatible-yellowgreen.svg"/></a>
A macOS onboarding component.
- creates a window containing a configurable number of screens
- use buttons or gestures to navigate
- component size, layout and content easily are configurable

Installation
Install using Swift Package Manager. Use master branch.
Dependencies
Requirements
- OS X 10.14+
- Xcode 11.0 or above
Demo/Example
Either compile and run the example in the Demo folder or see the component used in Crypto Tools.
Usage
Use the following code in your AppDelegate.swift or similar.
class AppDelegate: NSObject, NSApplicationDelegate {
private var onboardingWindowController: NSWindowController?
func applicationDidFinishLaunching(_ aNotification: Notification) {
let config = OnboardingConfig(
windowWidth: 350,
windowHeight: 430,
windowTitle: "my sample title",
pageCount: 3,
pageControlWidth: 200,
pageControlHeight: 20,
pageControlVerticalDistanceFromBottom: 20,
pageTransitionStyle: .stackBook
)
let pages = [
DTPageController(controllerId: "1"),
DTPageController(controllerId: "2"),
DTPageController(controllerId: "3")
]
let onboardingController = DTOnboardingController(config: config, pages: pages)
let frame = onboardingController.view.bounds
let myWindow = NSWindow(
contentRect: .init(origin: .zero, size: frame.size),
styleMask: [.closable, .miniaturizable, .resizable, .titled],
backing: .buffered,
defer: false
)
myWindow.title = config.windowTitle
myWindow.center()
onboardingWindowController = NSWindowController(window: myWindow)
onboardingWindowController?.contentViewController = onboardingController
onboardingWindowController?.showWindow(self)
}
}
License
This software is Open Source under the MIT license, see LICENSE for details.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
