scrollsToTop
A Boolean value that controls whether the scroll-to-top gesture is enabled.
Declaration
var scrollsToTop: Bool { get set }Discussion
The scroll-to-top gesture is a tap on the status bar. When a user makes this gesture, the system asks the scroll view closest to the status bar to scroll to the top. If that scroll view has scrollsToTop set to false, its delegate returns false from scrollViewShouldScrollToTop(_:), or the content is already at the top, nothing happens.
After the scroll view scrolls to the top of the content view, it sends the delegate a scrollViewDidScrollToTop(_:) message.
The default value of this property is true.
Special considerations
On iPhone, the scroll-to-top gesture has no effect if there’s more than one scroll view onscreen that has scrollsToTop set to true.