要排除Add CategoryViewController
到流程中,我们需要考虑:Add CategoryViewController
完成后,您希望拥有:
HomeViewController
> MyBusinessViewController
>TheBusinessXViewController
TheBusinessXViewController
将是要显示的控制器,然后:
let nextVC = self.storyboard?.instantiateViewController(withIdentifier: "TheBusinessXVC") as! TheBusinessXViewController
nextVC.id = self.idtruck
nextVC.extraparameter = "StringOrInt"
let newViewController = self.storyboard?.instantiateViewController(withIdentifier: "HomeVC") as! HomeViewController
let sencondViewController = self.storyboard?.instantiateViewController(withIdentifier: "MyBusinessVC") as! MyBusinessViewController
let customViewControllersArray : NSArray = [newViewController, sencondViewController, nextVC]
self.navigationController?.viewControllers = customViewControllersArray as! [UIViewController]
self.navigationController?.pushViewController(nextVC, animated: true)