init(Axis.Set, showsIndicators : Bool, content: () -> Content)
Overview 概要
The scroll view displays its content within the scrollable content region.
スクロールビューは、それの内容をスクロール可能なコンテンツ領域内に表示します。
As the user performs platform-appropriate scroll gestures, the scroll view adjusts what portion of the underlying content is visible. Scroll
can scroll horizontally, vertically, or both, but does not provide zooming functionality.
In the following example, a Scroll
allows the user to scroll through a VStack
containing 100 Text
views. The image after the listing shows the scroll view’s temporarily visible scrollbar at the right; you can disable it with the shows
parameter of the Scroll
initializer.
var body: some View {
ScrollView {
VStack(alignment: .leading) {
ForEach(0..<100) {
Text("Row \($0)")
}
}
}
}
To perform programmatic scrolling, wrap one or more scroll views with a Scroll
.