Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
269 views
in Technique[技术] by (71.8m points)

ios - Present New Storyboard Programmatically

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...