I have two labels in the view and one of the labels can be changed by user input (adding numbers). The constraints are set programmatically and the horizontal constraints with visual format language look like this:
"H:|-11-[label1]-[label2(>=30@750)]-10-|"
The results looks like:
|[the text in label1...][label2]|
But when the user adds some numbers to label 2 it will look like:
|[the text in label1...][......]|
I've tried using updateConstraintsIfNeeded(), updateConstraints() and layoutIfNeeded() but nothing is working.
This is the result I'm trying to get after inputting extra numbers:
|[the text in...][extra numbers]|
What am I doing wrong? Everything is programmatically coded.