The ScrollView element allows an application to display content that is larger than the size of the application's window by letting users to scroll around using swiping gestures.
If true scrolling is enabled, and if false scrolling is disabled.
If scrolling is disabled the ScrollView ignores all touch events.
Sets the allowable scroll orientations.
Allow horizontal scrolling.
Allow vertical scrolling.
Allow both horizontal and vertical scrolling.
If true the scroll area bounces when it encounters a boundary of the content. Bouncing visually indicates that scrolling has reached the edge of the content. If false, scrolling stops immediately at the content boundary.
By default, ScrollView will only allow dragging when the content region is larger than the bounds of the ScrollView. For example, if the ScrollView's contentWidth is less than its width, horizontal dragging will be disabled.
If these properties are set to true, and the bounces property is also true, dragging will be allowed even when the content is smaller than the bounds of the ScrollView.
Explicitly defines the bounding rectangle of the content to scroll.
By default the ScrollView uses the bounding rectangle of its children, so setting these properties is usually not required. However, to override the default and provide a custom content rectangle, you can set the contentX, contentY, contentWidth and contentHeight properties manually.
Setting any one of these properties explicitly disables the automatic child rectangle logic. For example, if you set contentWidth explicitly, the contentHeight would be treated as 0 unless you also explicitly set it.
Sets the appearance of the scroll indicators.
Do not show scroll indicators.
A light grey scroll indicator.
A darker grey scroll indicator.
A white scroll indicator.
Enables or disables paging. When enabled, the ScrollView stops on multiples of the ScrollView's bounds when the user scrolls.
Controls whether the scroll-to-top gesture is enabled for this ScrollView.
The scroll-to-top gesture is a tap on the status bar on iOS devices. When a user makes this gesture, the system asks the ScrollView closest to the status bar with the scrollsToTop property set to scroll to the top.
On iPhone, the scroll-to-top gesture has no effect if there is more than one ScrollView on screen that has scrollsToTop set.
Together the tracking, dragging and decelerating properties allow you to track the interaction state of the ScrollView.
The tracking property is true whenever the user is touching the ScrollView. Tracking returns to false once the user releases the ScrollView, or the interaction is canceled for some other reason.
The dragging property is true when the ScrollView is being dragged by the user. Whenever dragging is true, tracking will also be true. Dragging returns to false once the user releases the ScrollView, or the interaction is canceled for some other reason.
The decelerating property is true whenever the ScrollView is animating. This may be because the user flicked the ScrollView, it is automatically scrolling back to a valid position, or the scrollToOffset() method has been called.
You can interact with the ScrollView below to see how the properties respond.
If false, scrolling is permitted in both horizontal and vertical directions. If true and the user begins dragging in one general direction (horizontally or vertically), the scroll area disables scrolling in the other direction. If the drag direction is diagonal, then scrolling will not be locked and the user can drag in any direction until the drag completes.
These are read only properties that specify the current offset of the scroll area content.
If the specified item, point or rectangle is not within the scroll view's visible area, immediately move the ScrollView so that it is. If the item, point or rectangle is already visible, the ScrollView is not moved.
optional ScrollView.EnsureVisiblePosition moveTo = .Edge
Minimize the amount the ScrollView is moved, such that the target region is at the edge of the visible area.
Scroll the view such that the target region is as close to the center of the visible area as possible.
Jump immediately to the specified offset. If you would like to animate to an offset, use scrollToOffset() instead.
optional Bool clampToBounds = true
If clampToBounds is set, the offset is clamped to the ScrollView's valid range. Otherwise, the content offset can be set to a value outside the valid range and the ScrollView will then animate it back into range.
Jump immediately to the top or bottom of the content area.
Animate the content area offset to specified value. If you would like to jump to an offset without animation, use jumpToOffset() instead.
Immediately stop any scrolling.