Is it possible to added same FirstViewController class to UITabBarController -> tabBar -> 4 items added.
ZeroTabBarController -> FirstViewController -> FirstViewController -> ThirdTabBarController.
Is it possible to added same FirstViewController class to UITabBarController -> tabBar -> 4 items added.
ZeroTabBarController -> FirstViewController -> FirstViewController -> ThirdTabBarController.
Yes, you can do what you are trying to do.
To achieve this, you have to trick it little bit.
Below is what you will structure
Tabbar
- DummyOneVC - FirstVC
- SecondVC
- DummyThreeVC - FirstVC
- FourthVC
Now in DummyOneVC
, in viewWillAppear
you will transition to FirstVC
but without animation so that user will not know what you are doing behind.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let destVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "FirstVC") as! FirstVC
self.navigationController?.pushViewController(destVC, animated: false)
}