On the screen, there is primarily a ScrollView with it (top: 0, leading:0, trailing: 0, bottom: 0) , under it (in it) there is a UIView with the lines from the ScrollView (top: 0, leading:0, trailing: 0, bottom: 0, Align Center X) inside this UIView are first a UIImage , then a UILabel , then two UIButton .

UIImage is on top of the constrains (top: 20, leading:20, trailing: 20, bottom: 40 (от UILabel))

UILabel is under UIImage with Constrings (top: 40(от UIImage), leading:32, trailing: 32, bottom: 40 (от UIButton))

UIButton (Subscribe) is under UILabel with constrans (top: 40(от UILabel), Align Center X, bottom: 40 (от UIButton)) + fixed width 300 and height 45

UIButton (Skip) is under UIButton with constructions (top: 8(от UIButton), Align Center X, bottom: 20) + fixed width 300 and height 45

Here is the screen how the screen looks at the moment.

enter image description here

And so the question is why the UIView rose behind the button, I need the last button to go down, since its bottom is set to 20 from UIView , and the UILabel should be stretched.

What I missed, I have the feeling that you need to specify a priority somewhere, although I don’t know where, because I didn’t set a fixed height for UILabel and it had to stretch

Here is a screen from a storyboard, here you can see that UIView risen beyond UIButton

Here is a screen from a storyboard, here you can see that UIView has risen beyond UIButton

1 answer 1

UPD If there is a lot of text, you can reduce the text. If you need a scroll, then here is one of the options:

Option with scrolling

Added to the button "Subscribe" to add the contents of the label for demonstration.


In this description, you need to exclude from the hierarchy the Scroll View and everything will be as you wish.

enter image description here

Link to your example without ScrollView

  • But if for example the text is big, and it should be undone, I need to think about how it will look like on 4s. Therefore, I use a scroll - Kerim Khasbulatov
  • @ Ismail Khasbulatov updated the answer - VAndrJ