I want to be able to see the NSLayoutConstraints that I have set between individual UILabels while debugging. Is this possible?
Asked
Active
Viewed 1,983 times
6
-
2Maybe 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
-
1Your 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 Answers
12
With Xcode 6, there is a way to show the constraints while debugging.
- Run your application on either simulator or device.
Select 'Debug View Hierarchy' which appears between 'Step out' and 'Simulate Location'
Select the control that you want to view the constraints
- Select 'Show Constraints'
Result:

Valentin
- 3,272
- 1
- 14
- 22