6

I want to be able to see the NSLayoutConstraints that I have set between individual UILabels while debugging. Is this possible?

Valentin
  • 3,072
  • 1
  • 12
  • 22
  • 2
    Maybe this SO [question](http://stackoverflow.com/q/5150186/332248) might help? It's rather about how do inspect the view hierarchy either by string output or by using tools then to see the Constraints directly... – Jens May 19 '14 at 12:22
  • It looks like Reveal is going to do the trick. Thanks Jens! – Valentin May 20 '14 at 08:02
  • 1
    Your welcome. Btw. Upvoting is the way to say thanks on SO. Works on comments too. :-) – Jens May 20 '14 at 08:12
  • I don't see any arrows next to the comment (read that - http://stackoverflow.com/help/privileges/vote-up) ... I only see the up/down arrow next to my question :( – Valentin May 21 '14 at 12:37
  • They only appear when you hover over them with your mouse (next to a comment) But in your link it says you can only upvote when you scored 15 points. Since you just started you only have 1 and therefore can't upvote (I guess)... Nevermind. Hope Reveal is helping anyways... – Jens May 21 '14 at 12:43
  • Thanks Jens! Yeah, helps a lot. Sorry that I can't upvote you. – Valentin May 21 '14 at 12:44

1 Answers1

12

With Xcode 6, there is a way to show the constraints while debugging.

  1. Run your application on either simulator or device.
  2. Select 'Debug View Hierarchy' which appears between 'Step out' and 'Simulate Location'enter image description here

  3. Select the control that you want to view the constraints

enter image description here

  1. Select 'Show Constraints'

enter image description here

Result:

enter image description here

Valentin
  • 3,072
  • 1
  • 12
  • 22