Accommodating asymmetric safe area insets and system clusters across both display surfaces

We have observed that the inner display and the outer cover display possess vastly different safe area profiles (top-aligned system band vs. trailing margin status cluster).

When developing full-bleed UIKit interfaces using .edgesIgnoringSafeArea equivalents or custom container controllers, what is the best practice for pinning controls to avoid occlusion by hardware bezels or dynamic system clusters without creating rigid, hardcoded coordinate offsets? Does UIView.layoutMarginsGuideautomatically factor in active system reserved regions?

Answered by Technology Evangelist in 906729022

Hello @alelabs,

In UIKit, UIView.LayoutRegion represents a specific layout area within a view, providing structure for UI elements and layouts. I believe the API you are looking for is margins(cornerAdaptation:) .

Another API that will allow you to avoid reserved regions is reservedRegions(kind:options:).

You can learn how to use the latter by watching the video "Strike a pose with adaptive layouts on iPhone Duo".

https://developer.apple.com/videos/play/tech-talks/111463

Hello @alelabs,

In UIKit, UIView.LayoutRegion represents a specific layout area within a view, providing structure for UI elements and layouts. I believe the API you are looking for is margins(cornerAdaptation:) .

Another API that will allow you to avoid reserved regions is reservedRegions(kind:options:).

You can learn how to use the latter by watching the video "Strike a pose with adaptive layouts on iPhone Duo".

https://developer.apple.com/videos/play/tech-talks/111463

Accommodating asymmetric safe area insets and system clusters across both display surfaces
 
 
Q