Instance Property

insetsLayoutMarginsFromSafeArea

A Boolean value indicating whether the view's layout margins are updated automatically to reflect the safe area.

Declaration

var insetsLayoutMarginsFromSafeArea: Bool { get set }

Discussion

When the value of this property is true, any margins that are outside the safe area are automatically modified to fall within the safe area boundary. The default value of this property is true. Changing the value to false allows your margins to remain at their original locations, even when they are outside the safe area.

See Also

Getting the Safe Area

Positioning Content Relative to the Safe Area

Position views so that they are not obstructed by other content.

var safeAreaInsets: UIEdgeInsets

The insets that you use to determine the safe area for this view.

var safeAreaLayoutGuide: UILayoutGuide

The layout guide representing the portion of your view that is unobscured by bars and other content.

func safeAreaInsetsDidChange()

Called when the safe area of the view changes.