Edit

Share via


UIScrollViewDelegate.ShouldScrollToTop(UIScrollView) Method

Definition

Called by the scroll view to determine whether it should scroll to the top of the content.

[Foundation.Export("scrollViewShouldScrollToTop:")]
public virtual bool ShouldScrollToTop (UIKit.UIScrollView scrollView);
abstract member ShouldScrollToTop : UIKit.UIScrollView -> bool
override this.ShouldScrollToTop : UIKit.UIScrollView -> bool

Parameters

scrollView
UIScrollView

Scroll view requesting whether scroll is allowed.

Returns

true to allow scrolling to the top of the content, false to prevent it.

Attributes

Remarks

If this method is not implemented, true is the default. For the scroll-to-top gesture (tap on the status bar) to work, ScrollsToTop (on UIScrollView) must be set to true.

Applies to