Reference to:http://blog.csdn.net/liujinlongxa/article/details/46490949
Objective
Do iOS development often meet this situation, product Wang take what you do come to say: "This label font size is not correct, my Rimingming labeled 20px, this size is certainly not 20px", so you argue with him, my code is really 20px, in order to prove your judgment, So you drive in the code to find where to set the font. Then there is a problem, if the code is you write, you may be able to quickly locate the corresponding code, but if the code is not written by you, then you have to waste a time to find the response of the setup code, if the project is very large, it is more troublesome. Is there a quicker way to get a quick look at some of the settings on the UI and the hierarchy of the UI? Of course, this is the Debugviewhierarchy function of Xcode.
Brief introduction
Debugviewhierarchy (view debugging) is a new feature of XCODE6 that allows developers to dynamically view the display of the current interface when the program is running, including the level of the view, the size and position of the control, and the level of the current view with a three-dimensional effect. Let's take a look at how to debug the view.
Detailed Introduction
For the sake of simplicity, here I use SB to quickly build a simple UI such as:
Note: The Debugviewhierarchy feature is used here because only in the case of the emulator
Then, click the Debugviewhierarchy button in the Debug window,
You can see the 3D of the entire interface, such as
You can switch between different 3D angles by dragging the mouse.
In the debug navigation bar on the left, select View UI Hierarchy to see a list of the views hierarchy for the entire interface
Select a view in the 3D view to see the details of the view in the inspector on the right
3D View below also has a row of action buttons and progress bar, you can adjust the size of the 3D view, display levels, intervals, etc., concrete can be practical to understand the operation.
Summarize
With the Debugviewhierarchy feature, we can visually examine my UI layout and see the properties of each view, which can really be very handy.
[MAC OS] Debug View hierarchy features in Xcode