Storyboard NavigationController || PushViewController Swift

Using in Botton of action




let nextPage = storyboard?.instantiateViewController(withIdentifier: "PageOne") as? SeconViewController

                self.navigationController?.pushViewController(nextPage!, animated: true)

One more Example:



 @IBAction func backHomePage(_ sender: UIBarButtonItem) {
        let backHome = storyboard?.instantiateViewController(withIdentifier: "homePage") as! ViewController
        self.navigationController?.pushViewController(backHome, animated: true)
        
    }















Post a Comment

0 Comments