Demo entry 6763791

ss

   

Submitted by s on Oct 26, 2018 at 04:10
Language: Swift. Code size: 856 Bytes.

func distributeViewController() {

        switch state {
        case .Welcome: //Welcome/Guide
            let nav = UINavigationController.init(rootViewController: WelcomeViewController())
            nav.modalTransitionStyle = .flipHorizontal
            self.present(nav, animated: true, completion: nil)
            
        case .Login: //Login page
            let nav = UINavigationController.init(rootViewController: LoginViewController())
            nav.modalTransitionStyle = .flipHorizontal
            self.present(nav, animated: true, completion: nil)
            
        case .Home: //Home page
            let nav = UINavigationController.init(rootViewController: HomeViewController())
            nav.modalTransitionStyle = .flipHorizontal
            self.present(nav, animated: true, completion: nil)
        }
    }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).