⚠️ Fixed leading and trailing constraints may cause clipping

Rui Aureliano
Nov 7 · 2 min read

When using storyboard and auto-layout we see sometimes this warning

So what this means? after some digging this seems to happen when using components with text, and seems to be related with localization.

So I made this simple sample, just a UIView with padding of 100px, and a UILabel with padding of 50px

And there is the warning 😡

⚠️ warning: Auto Layout Localization: Fixed leading and trailing constraints may cause clipping, one of them should have a constant ≥ standard space.

The message is self-explanatory, its related with leading and/or trailing for this particular UILabel, the suggestion is to use , which breaks this sample.

To fix this (not 100% of the implications for other languages), but for the leading and trailing just remove the option for Respect Language Direction.

Select the leading constraint, and for Attributes Inspector, select the dropdown and remove the option for Respect Language Direction. After that , you should see LABEL.left instead of LABEL.leading

Done, no more warnings 💪


I’m Rui Aureliano, iOS & macOS Engineer at @OlaBrothers. Maker of http://sipapp.io

Rui Aureliano

Written by

iOS & macOS Developer at @OlaBrothers. Maker of http://sipapp.io

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade