As per image below, how do I prevent the UITextView to overflow underneath the UIButton? There's a general leading and trailing space of 8 and the UITextView is set to word wrap and lines = 0. Content hugging prio on the UIButton is 751 which makes it restrict it's size to the entered text and not take up half of the space with the UITextField. I've set content insets on the UIButton to have some internal padding to the button text.
I want the button to resize correctly to its internal text, which may vary in length with translations, and then the text view to fill up the remaining width, but row break if it doesn't fit.
You haven't shown your constraints, but based on what's happening and the fact that you see red lines indicates something is not correct.
Here is a basic layout:
Which results in this:
As you can see, when the text is too long for the label, it gets ... truncated, instead of pushing on into the button.
I set the button's Content Insets (to match your image):
And it's important that the button's Content Hugging and Compression Resistance is set as follows: