Figure 17.6 shows 3 constraints and the book says 5?!

Figure 17.6 shows 3 constraints and the book says add 5 constraints, I stopped and can’t figure out what constraints I need to do? Please help! :frowning:

"Open the Add New Constraints menu and configure the constraints as shown in Figure 17.6. Click Add 5 Constraints and the frames for both the visual effect view and the stack view will update. "

1 Like

Figure 17.6 shows constraints on all 4 edges plus height; that makes 5 total. The leading & trailing edge constraints have a 0 offset but they’re still enabled.

1 Like

what should be the stack height?

Did you try the default presented?

If you haven’t already done so, check out the Auto Layout Cookbook. Although no longer being updated, it is still worth reading.

1 Like

The height should be 50. I took a look to solutions and the stack view should have 0 leading, 0 trailing, 8 top, 0 bottom and height 50. Apparently the image (figure 17.6) is incorrect.

2 Likes

Thanks, @janzoner. Your suggestion solved my problem with the constraints for the stack view.

Weird… my version of the book shows the following graphic for Figure 17.6, which I believe is correct:

Screen Shot 2021-05-27 at 4.13.24 PM

I’m reading on learning.oreilly.com and the book’s publication info says:

Seventh edition, first printing, March 2020
Release E.7.1.1