Instance Method

scrollViewShouldScrollToTop:

Asks the delegate if the scroll view should scroll to the top of the content.

Declaration

- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView;

Parameters

scrollView

The scroll-view object requesting this information.

Return Value

YES to permit scrolling to the top of the content, NO to disallow it.

Discussion

If the delegate doesn’t implement this method, YES is assumed. For the scroll-to-top gesture (a tap on the status bar) to be effective, the scrollsToTop property of the UIScrollView must be set to YES.

See Also

Responding to Scrolling and Dragging

- scrollViewDidScroll:

Tells the delegate when the user scrolls the content view within the receiver.

- scrollViewWillBeginDragging:

Tells the delegate when the scroll view is about to start scrolling the content.

- scrollViewWillEndDragging:withVelocity:targetContentOffset:

Tells the delegate when the user finishes scrolling the content.

- scrollViewDidEndDragging:willDecelerate:

Tells the delegate when dragging ended in the scroll view.

- scrollViewDidScrollToTop:

Tells the delegate that the scroll view scrolled to the top of the content.

- scrollViewWillBeginDecelerating:

Tells the delegate that the scroll view is starting to decelerate the scrolling movement.

- scrollViewDidEndDecelerating:

Tells the delegate that the scroll view has ended decelerating the scrolling movement.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software