I made a demo for you according to your requirement. Download it from below link,
Autoresize UIView and UILabel
Step by Step Guide :-
Step 1 :- Set constrain to UIView
1) Leading 2) Top 3) Trailing (From mainview)
![enter image description here](https://i.stack.imgur.com/M6Ck5.gif)
Step 2 :- Set constrain to Label 1
1) Leading 2) Top 3) Trailing (From it's superview)
![enter image description here](https://i.stack.imgur.com/FeBFW.gif)
Step 3 :- Set constrain to Label 2
1) Leading 2) Top 3) Trailing (From it's superview)
![enter image description here](https://i.stack.imgur.com/GLCVp.gif)
Step 4 :- Most tricky give bottom to UILabel from UIView.
In Xcode 10 and above - Select your UIView and Label after that from the Align Constraint section select Bottom Edges constraint.
![enter image description here](https://i.stack.imgur.com/WcjmM.gif)
![enter image description here](https://i.stack.imgur.com/aJGM8.png)
Step 5 :- (Optional) Set constrain to UIButton
1) Leading 2) Bottom 3) Trailing 4) Fixed Height (From mainview)
![enter image description here](https://i.stack.imgur.com/CYwZG.gif)
Output :-
![enter image description here](https://i.stack.imgur.com/zaM0A.gif)
Note :- Make sure you have set Number of lines =0 in Label property.
![enter image description here](https://i.stack.imgur.com/g3w1L.png)
Edit1 :- If you want to increase size with BottomConstrain (>=) please check below Image.
![enter image description here](https://i.stack.imgur.com/AsYMf.png)
I hope this info enough to understand Autoresize UIView according to UILabel's height and Autoresize UILabel According to text.