I'm trying to present an onboarding flow programmatically when the app is launching, but the segue to the Onboarding Storyboard's OnboardingInitialVC is not occurring. Here's my code:
extension UIViewController {
func presentOnboardingFlow() {
let storyboard = UIStoryboard(name: "Onboarding", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "OnboardingInitialVC")
present(vc, animated: true, completion: nil)
}
}
I'm calling this inside of the SceneDelegate
's sceneDidBecomeActive()
delegate method.
I've tried calling this inside of the initial ViewController with a successful segue, but the issue is that all the tabBars are visible when the segue is called.
How can I perform the segue successfully?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…