You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I didn't see in the documentation or the example a guide on how to link up the continue button to link the click action to another view controller did I miss something?
Also it would seem you would want to run this in a first run situation, do you have a preferred method of detecting first run and launching SwiftyOnboard?
The text was updated successfully, but these errors were encountered:
Here's a quick way of linking up that continue button with an action to take you to another ViewController
@objc func handleContinue(sender: UIButton) {
let index = sender.tag
if index == 2 {
//Replace the '2' with the amount of onboarding screens that you have - 1
//Perform your segue
return
}
swiftyOnboard?.goToPage(index: index + 1, animated: true)
}
Also it would seem you would want to run this in a first run situation, do you have a preferred method of detecting first run and launching SwiftyOnboard?
This is my approach in the AppDelegate:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
if isFirstLaunch() {
//Do whatever you need to do on first launch
}
return true
}
func isFirstLaunch() -> Bool {
let hasLaunched = UserDefaults.standard.bool(forKey: "appHasLaunched")
if !hasLaunched {
//First Launch
UserDefaults.standard.set(true, forKey: "appHasLaunched")
return true
} else {
//It's not first Launch
return false
}
}
Hi, I didn't see in the documentation or the example a guide on how to link up the continue button to link the click action to another view controller did I miss something?
Also it would seem you would want to run this in a first run situation, do you have a preferred method of detecting first run and launching SwiftyOnboard?
The text was updated successfully, but these errors were encountered: