[MAC OS] Debug View hierarchy features in Xcode

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.