Xcode View Debugging

Source: Internet
Author: User

View debugging

By using the view debugger to examine your view hierarchy, you can easily determine view location, size, and implementation issues.

    • Run your application in Xcode and click the Debug View Hierarchy button on the Debug bar to enter the view debugger.

Xcode stops your application, displays the view hierarchy in the debug navigation bar, and displays an interactive three-dimensional model in the main editor.

Select the window that appears, click anywhere in the main editor, and press the mouse button to drag. Views are decomposed into three-dimensional hierarchies, allowing you to see the hierarchy of the view layer and the relationship between views.

The slide button on the left allows you to adjust the view spacing so that you can more easily observe individual view objects. The swipe button on the right allows you to filter out a specific view in a complex view hierarchy using a "back to front" or "front to back" approach.

    • In the middle of the two sliding buttons is the editor button

    • Click the Crop button to display the contents of the currently displayed entity in the main editor.

    • Click the Show Constraints button to display the automatic layout constraints for the currently selected view layer in the main editor.

Note: Dimensional inspection allows you to check the size and constraint values.

    • Use the reset button to have the view in the main editor appear in a standard direction.
    • Click the View Mode button to choose whether to display the view content, wireframe, and content in the main editor.
    • The zoom control group allows you to increase or decrease the display multiplier, or display the standard size.

Note : You can also zoom out on the main editor using grip gestures. Scroll through the displayed view with two finger drag gestures in the editor window.

Displays colors and dimensions precisely in pixels on the main editor.

    • Select a view entity in the view hierarchy, select it in the editor, and then display its properties in the check bar. The view hierarchy in the modal navigation window shows the relationship between each view and its parent, child, and sibling views.
Note: Selecting an entity in the formula bar is set to a secondary selection set, it is displayed in a lighter color on the view hierarchy. The main selection rally is highlighted in dark colors. These different selection sets can distinguish between the main view (selected on the view hierarchy) and other selected Views (selected in the formula bar) in a complex view hierarchy.
    • Filter bar under the view hierarchy, it contains two filter buttons (enabled by default). The button on the left is the main view, which filters out two element entity objects that are implemented from the system view (not controlled by the app). The button on the right shows only the visible view, that is, it filters out the view that the application hides using View properties.

      Enter a type name in the filter bar to easily filter out the view.

    • Use the auxiliary editor to set the automatic mode to view the source code of the selected View object.
Note: When a custom View object is selected, the secondary editor displays the implementation file. When a system framework provides a view object that is selected, the secondary editor displays the interface file.
    • Click the Continue button on the debug bar to exit the view debugger, and then continue running your application in Xcode.
RELATED Links: Xcode 6 View Debugging Tips Xcode View Debugger Detailed view debugging for Xcode 6

Xcode View Debugging

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.