I want to add a new label to a view and I want it to be laid out and positioned like this.

Screen Shot 2016-11-21 at 7.25.08 AM.png

There are x3 constaints here.

Screen Shot 2016-11-21 at 7.25.43 AM.png

And I want to add them to this new label here.

Screen Shot 2016-11-21 at 7.26.20 AM.png

Let’s see how we can do it. Let’s start with the simple one. The width.

Screen Shot 2016-11-21 at 7.26.42 AM.png

Screen Shot 2016-11-21 at 7.26.58 AM.png

Now let’s get it centered

Screen Shot 2016-11-21 at 7.35.35 AM.png

Screen Shot 2016-11-21 at 7.27.34 AM.png

OK. Only one missing now is tying it relationally to something on the top.

Screen Shot 2016-11-21 at 7.28.21 AM.png

We can add that by simply adding a top constraint like its pair with value 108.

Screen Shot 2016-11-21 at 7.29.18 AM.png

Screen Shot 2016-11-21 at 7.29.39 AM.png

 

Screen Shot 2016-11-21 at 7.29.46 AM.png

Great. Orange is good. Just means we need to adjust the layout. Which we can do with

Cmd alt =

Screen Shot 2016-11-21 at 7.31.44 AM.png

Voila! New laid out label.