Why can't you "Use Standard Values" in constraints with Safe Area Layout Guides?

Is there a reason why constraints to safe area layout guides in Interface Builder can't be set to "Use Standard Value"?


Prior to Safe Area Layout Guides, we had leading/trailing margins and Top / Bottom Layout Guides:

  • I understood that pinning views to the leading and trailing margins didn't have access to "Use Standard Value" because these margins already provide a standard value from the edges.
  • Top and bottom layout guides, on the other hand, merely indicated where top and bottom edges extended to, excluding navigation bars and status bars etc. Unlike leading and trailing margins, they didn't by default provide a standard distance from these bars etc, so constraints pinned to the Top and Bottom layout guides did have access to "Use Standard Value".

Top and Bottom Layout Guides are now deprecated in favor of Safe Area Layout Guides, which perform a similar function, indicating an area that will not be covered up by UIKit components such as Tab bars, Navigation bars etc. In iOS at least (tvOS seems another story) the safe area doesn't seem to indicate the edge + a standard distance (as leading and trailing margins did). But constraints don't have access to "Use Standard Value" either. (See it grayed out below)

This means that if we use Safe Area Layout guides to constrain a view to the edges, we no longer have access to standard distances.


Is this an oversight, or am I missing something?


It also seems extremely buggy, for example:

Bug #1 - If you migrate a storyboard to Safe Area Layout Constraints, the top and bottom constraints do seem to have "Use Standard Value" selected (though the "standard value" seems to be 0). If you change to another value, however, there's then no way to return to "Use Standard Value". All very strange!

Bug #2 - If you have a good old fashioned leading or trailing constraint pinned to the root view that is set to "Relative to Margin" and you switch to "Safe Area", the "Relative to Margin" option disappears of course, but you cannot "Use Standard Value". HOWEVER - if you turn off "Relative to Margin" before switching to "Safe Area" then "Use Standard Value" is available with Safe Area Layout Margins. I've even encountered situations where I need to turn "Relative to Margin" on and then off again to then be able to "Use Standard Value". That said, this "standard value" seems to be 0, so doesn't seem to be working even if it's selected.