Why is this stack view template ambiguous?

I am trying to create a relatively simple (!) Layout with iOS 9 Stack Views. This is the storyboard:

enter image description here

With the following location:

enter image description here

But this is ambiguous: Titles Stack View: Need constraints for: X position or width , Times Stack View: Need constraints for: X position or width . I do not understand why. I set the horizontal crawl priority of the Titles Stack View less than the Times Stack View , what else do I need to do?

+5
source share
2 answers

No need to live with inappropriate views or a stack view that doesn't do what you want. Try this: put the priority on the content cover on the “Heading 1” label at 252. I'm sure it will be a trick. If this is not the case, return it to 251 and pat it a bit with the priority of crawling content (and maybe compression resistance) on other labels. Do not go crazy. One-point tuning for one or two tags should give you the result you want.

+3
source

My Times Stack View alignment was set to Trailing , setting it to Fill fixed the problem.

(Although Xcode shows that some of the views are not taken into account no matter what I do, but I put this as an error)

0
source

Source: https://habr.com/ru/post/1242792/


All Articles