I was using Xcode’s View Hierarchy and noticed this UITransitionView
in my view hierarchy.
...
UIWindow
UITransitionView
FooVC
UITransitionView
BarVC
This was odd because I was expected a view hierarchy as such:
...
UIWindow
UITransitionView
FooVC
BarVC
What made it more perplexing was that the canvas was showing things correct, but the View Hierarchy didn’t make sense.
To be clear on jargon, the following is the name of each section of Apple’s view debugger:
I googled Apple documents, but found nothing on UITransitionView
. It’s private API.
I had suspicions for why I was seeing it… So I opened up a sample project to test things out.
The following is the view hierarchy I got for presenting the yellow VC on another VC.
Expanded Hierarchy is as such:
Conclusion
If you you’re seeing multiple UITransitionView
it’s likely because you’re presenting one viewcontroller over another. One UITransitionView
is for the presenting nav stack while the other is for the presented nav stack.