I have a navController with 4 vc's:
navigationController
FirstController
SecondController
ThirdController
FourthController
When I'm on the FirstController
I want to print out a list of all the child vcs that haven't been pushed on the stack.
I tried:
let allVCs = self.navigationController!.childViewControllers
print(allVCs.description)
I also tried:
let allVCs = self.navigationController!.viewControllers
print(allVCs.description)
In both cases I only get a print statement of ProjectName.FirstController
. I realize I get that because that's the only one currently on the stack.
How do I find out the rest of the child vcs even though they haven't been pushed on the stack as of yet?
//print statements I'm looking to get
ProjectName.FirstController
ProjectName.SecondController
ProjectName.ThirdController
ProjectName.FourthController