Reputation: 4783
As you can see in the image above, the label on the far right is being placed off-screen. This label should show '14:23'.
Here's a screenshot of the constraints on the central label:
The 'Time' label has a constraint attaching it to the right side.
I need this layout to be compatible with both iPad and iPhone. How can I stop the Time label being pushed off the screen?
Upvotes: 0
Views: 328
Reputation: 2870
This probably has nothing to do with the constraint you marked, but instead is an issue of the content compression resistance priorities of the three labels. You need to specify them in an order that fits your need. E.g. if you absolutely want to make sure that the 'B123' and the '14:23' label can be fully read, specify a content compression resistance of 1000 (required) for those two labels and a lower priority for the middle label.
The compression resistance describes, how important it is for the label not to be smaller as its required space.
The opposite of this is the content hugging priority. This priority describes how important it is for the label not to be larger than the content requires it.
Upvotes: 1