Protocol

UIScrollViewDelegate

The methods declared by the UIScrollViewDelegate protocol allow the adopting delegate to respond to messages from the UIScrollView class and thus respond to, and in some affect, operations such as scrolling, zooming, deceleration of scrolled content, and scrolling animations.

Declaration

@protocol UIScrollViewDelegate

Topics

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.

- scrollViewShouldScrollToTop:

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

- 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.

Managing Zooming

- viewForZoomingInScrollView:

Asks the delegate for the view to scale when zooming is about to occur in the scroll view.

- scrollViewWillBeginZooming:withView:

Tells the delegate that zooming of the content in the scroll view is about to commence.

- scrollViewDidEndZooming:withView:atScale:

Tells the delegate when zooming of the content in the scroll view completed.

- scrollViewDidZoom:

Tells the delegate that the scroll view’s zoom factor changed.

Responding to Scrolling Animations

- scrollViewDidEndScrollingAnimation:

Tells the delegate when a scrolling animation in the scroll view concludes.

Responding to Inset Changes

- scrollViewDidChangeAdjustedContentInset:

Called when the scroll view's inset values changed.

See Also

Responding to Scroll View Interactions

delegate

The delegate of the scroll-view object.