I have a custom UITableViewCell
that has two UILabels
that sit next to each other. I need the UILabel
on the left to grow as it's text grows and the UILabel
on the right of it it to move over to the right as this happens.
I am using Autolayout and have setup the constraints. However the UILabel on the left never fits the text it has. I have tried sizeToFit
however this does;t do anything. Can someone tell me where I am going wrong?
I thought auto layout will grow the UILabels based on their intrinsic content sizes?
Edit
Here is what my cell looks like:
So the top left label has the following constraints:
Pinned to left / top edges. Width constraint Horizontal spacing to label to its right.
The label to its right has similar constraints too.
I need the UIImageView and the grey label to move to the right as the label on the far left grows.