Contents

widthFollowsPreferredContentSizeWhenEdgeAttached

A Boolean value that determines whether the sheet’s width matches its view controller’s preferred content size.

Declaration

var widthFollowsPreferredContentSizeWhenEdgeAttached: Bool { get set }

Discussion

The default value is false, which means the sheet’s width equals the width of its container’s safe area. Set this value to true to use your view controller’s preferredContentSize to determine the width of the sheet instead.

This property doesn’t have an effect when the sheet is in a compact-width and regular-height size class, or when prefersEdgeAttachedInCompactHeight is false.

See Also

Managing the appearance