The placement of margins.
Different views can support customizating margins that appear in
different parts of that view. Use values of this type to customize
those margins of a particular placement.
For example, use a ``ContentMarginPlacement/scrollIndicators``
placement to customize the margins of scrollable view's scroll
indicators separately from the margins of a scrollable view's
content.
Use this type with the ``View/contentMargins(_:for:)`` modifier.
Members (3)
get · iOS 17.0+
scrollContent
TypeScript
static get scrollContent(): ContentMarginPlacement
Swift declaration
static var scrollContent: ContentMarginPlacement { get }
The scroll content placement.
Scrollable views like ``ScrollView`` will use this placement to
inset their content, but not their scroll indicators.
get · iOS 17.0+
scrollIndicators
TypeScript
static get scrollIndicators(): ContentMarginPlacement
Swift declaration
static var scrollIndicators: ContentMarginPlacement { get }
The scroll indicators placement.
Scrollable views like ``ScrollView`` will use this placement to
inset their scroll indicators, but not their content.
get · iOS 17.0+
automatic
TypeScript
static get automatic(): ContentMarginPlacement
Swift declaration
static var automatic: ContentMarginPlacement { get }
The automatic placement.
Views that support margin customization can automatically use
margins with this placement. For example, a ``ScrollView`` will
use this placement to automatically inset both its content and
scroll indicators by the specified amount.