The guide for aligning the subviews in this stack. このスタックの中のサブビューを整列するためのガイド。 All child views have the same vertical screen coordinate.
Initializerinit(alignment:
init(alignment:spacing:pinnedViews:content:)
Creates a lazy horizontal stack view with the given spacing, vertical alignment, pinning behavior, and content.
Availability 有効性
- iOS 14.0+
- iPadOS 14.0+
- macOS 11.0+
- Mac Catalyst 14.0+
- tvOS 14.0+
- watchOS 7.0+
Technology
- Swift
UI
Declaration 宣言
init(alignment: VerticalAlignment
= .center, spacing: CGFloat
? = nil, pinnedViews: PinnedScrollableViews
= .init(), content: () -> Content)
Parameters パラメータ
alignment
spacing
The distance between adjacent subviews, or
nil
if you want the stack to choose a default distance for each pair of subviews.pinnedViews
The kinds of child views that will be pinned.
content
A view builder that creates the content of this stack. あるビュービルダー、それはこのスタックの内容を作成します。