Reputation: 42139
I have a custom UITableViewCell
that has a titleLabel on the left, and a detail label on the right, similar to the Right Detail
cell type.
Current neither UILabel
has a set width, which is what I want. However the titleLabel
sometimes is very long and overlaps the detail label on the right.
How can I give a margin between the two labels, ONLY if the titleLabel
is too long and will overlap?
Upvotes: 1
Views: 863
Reputation: 2590
The thing what you can do, is set minimum space between them by putting relation GraterThenOrEqual
for example at 10 pixels.
Or there is a dodgy way to it by playing with priority with constraints. You may set priority of constraint between as 750.
In the interface builder you have to set space between the labels, and then select manually this constraint, then you will see the menu
called Relation, just choose there GraterOrEqual
Upvotes: 1