Anu Mittal
Anu Mittal

Reputation: 301

View Debugging: What are the layers of view in any View Controller?

For example, when I add a table view to my view controller what would the view hierarchy be? Is UIWindow always the base View of the hierarchy? In which layer does the Status Bar lie?

I mostly write code programmatically, therefore, have some queries while visualizing the hierarchy.

Upvotes: 4

Views: 3720

Answers (1)

SachinVsSachin
SachinVsSachin

Reputation: 6427

The Xcode debugger provides the ability to inspect and understand the view hierarchy.

With your app running in the debugger, click the Debug View Hierarchy button in the debug bar. enter image description here

Here is reference of visual code debugging. https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/special_debugging_workflows.html

enter image description here

Upvotes: 5

Related Questions