flipsForRightToLeftLayoutDirection
Sets whether this view mirrors its contents horizontally when the layout direction is right-to-left.
Declaration
compose().flipsForRightToLeftLayoutDirection(enabled: boolean)nonisolated func flipsForRightToLeftLayoutDirection(
_ enabled: Bool
) -> some ViewParameters
enabled*booleanA Boolean value that indicates whether this view should have its content flipped horizontally when the layout direction is right-to-left. By default, views will adjust their layouts automatically in a right-to-left context and do not need to be mirrored.
Return value
A view that conditionally mirrors its contents horizontally when the layout direction is right-to-left.
Discussion
Use flipsForRightToLeftLayoutDirection(_:) when you need the system to
horizontally mirror the contents of the view when presented in
a right-to-left layout.
To override the layout direction for a specific view, use the
View.environment(_:_:) view modifier to explicitly override
the EnvironmentValues.layoutDirection environment value for
the view.
See also
More in Layout.
- alignmentGuideSets the view's vertical alignment.
- aspectRatioConstrains this view's dimensions to the specified aspect ratio.
- containerCornerOffsetAdjusts the view's layout to avoid the container view's corner insets for the specified edges.
- containerRelativeFramePositions this view within an invisible frame with a size relative to the nearest container.
- controlSizeSets the size for controls within this view.
- defaultScrollAnchorAssociates an anchor to control which part of the scroll view's content should be rendered by default.
- dynamicTypeSizeSets the Dynamic Type size within the view to the given value.
- fixedSizeFixes this view at its ideal size.
- framePositions this view within an invisible frame.
- geometryGroupIsolates the geometry (e.g. position and size) of the view from its parent view.
- gridCellAnchorSpecifies a custom alignment anchor for a view that acts as a grid cell.
- gridCellColumnsTells a view that acts as a cell in a grid to span the specified number of columns.