Search code examples
iosxcodeautolayoutlldb

Xcode view AutoLayout issues


Does anyone know how to view the AutoLayout issues in Xcode's view debugger? In the view hierarchy window, I get the following showing "4 issues" for my button component, but how do I find out what those four issues are? It cannot be clicked on and when I expand the element, none of the child views are showing any issues. I cannot seem to find anything that explains how to find out what the four issues are.

enter image description here


Solution

  • If you see this warning icon:

    enter image description here

    You should also see a purple warning Triangle icon at the top:

    enter image description here

    Depending on the issue, you may also see the explanation in the Inspector pane:

    enter image description here


    Edit

    Apparently, View Debug Hierarchy in Xcode Version 14.2 (14C18) has some bugs.

    In this example:

    enter image description here

    Label "V1" has only a Top constraint -- hovering over the Warning Icon shows the correct information.

    Label "V2" is configured with a layer shadow... hovering over the icon should tell me "The layer is using dynamic shadows which are expensive to render...", but instead simply shows "4 issues" with no way to see those issues.

    Also, there is no longer a purple icon in the top navigation bar...