Update to correct dependency
A macOS onboarding component.
Install using Swift Package Manager. Use master branch.
Either compile and run the example in the Demo folder or see the component used in Crypto Tools.
Use the following code in your AppDelegate.swift or similar.
AppDelegate.swift
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) } }
This software is Open Source under the MIT license, see LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
DTOnboarding
A macOS onboarding component.
Installation
Install using Swift Package Manager. Use master branch.
Dependencies
Requirements
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.License
This software is Open Source under the MIT license, see LICENSE for details.