Protocol: UIScrollViewDelegate
Overview
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.Tells the delegate that the scroll view has ended decelerating the scrolling movement.Tells the delegate when dragging ended in the scroll view.Tells the delegate when a scrolling animation in the scroll view concludes.Tells the delegate when zooming of the content in the scroll view completed.Tells the delegate when the user scrolls the content view within the receiver.Tells the delegate that the scroll view scrolled to the top of the content.Tells the delegate that the scroll view’s zoom factor changed.Asks the delegate if the scroll view should scroll to the top of the content.Tells the delegate that the scroll view is starting to decelerate the scrolling movement.Tells the delegate when the scroll view is about to start scrolling the content.Tells the delegate that zooming of the content in the scroll view is about to commence.Tells the delegate when the user finishes scrolling the content.Asks the delegate for the view to scale when zooming is about to occur in the scroll view.
Instance Method Summary (collapse)
-
- scrollViewDidEndDecelerating:
Tells the delegate that the scroll view has ended decelerating the scrolling movement.
-
- scrollViewDidEndDragging:willDecelerate:
Tells the delegate when dragging ended in the scroll view.
-
- scrollViewDidEndScrollingAnimation:
Tells the delegate when a scrolling animation in the scroll view concludes.
-
- scrollViewDidEndZooming:withView:atScale:
Tells the delegate when zooming of the content in the scroll view completed.
-
- scrollViewDidScroll:
Tells the delegate when the user scrolls the content view within the receiver.
-
- scrollViewDidScrollToTop:
Tells the delegate that the scroll view scrolled to the top of the content.
-
- scrollViewDidZoom:
Tells the delegate that the scroll view’s zoom factor changed.
-
- scrollViewShouldScrollToTop:
Asks the delegate if the scroll view should scroll to the top of the content.
-
- scrollViewWillBeginDecelerating:
Tells the delegate that the scroll view is starting to decelerate the scrolling movement.
-
- scrollViewWillBeginDragging:
Tells the delegate when the scroll view is about to start scrolling the content.
-
- scrollViewWillBeginZooming:withView:
Tells the delegate that zooming of the content in the scroll view is about to commence.
-
- scrollViewWillEndDragging:withVelocity:targetContentOffset:
Tells the delegate when the user finishes scrolling the content.
-
- viewForZoomingInScrollView:
Asks the delegate for the view to scale when zooming is about to occur in the scroll view.
Instance Method Details
- (Object) scrollViewDidEndDecelerating(scrollView)
Tells the delegate that the scroll view has ended decelerating the scrolling movement. The scroll view calls this method when the scrolling movement comes to a halt. The decelerating property of UIScrollView controls deceleration.
- (Object) scrollViewDidEndDragging(scrollView, willDecelerate:decelerate)
Tells the delegate when dragging ended in the scroll view. The scroll view sends this message when the user’s finger touches up after dragging content. The decelerating property of UIScrollView controls deceleration.
- (Object) scrollViewDidEndScrollingAnimation(scrollView)
Tells the delegate when a scrolling animation in the scroll view concludes. The scroll view calls this method at the end of its implementations of the UIScrollView and setContentOffset:animated: and scrollRectToVisible:animated: methods, but only if animations are requested.
- (Object) scrollViewDidEndZooming(scrollView, withView:view, atScale:scale)
Tells the delegate when zooming of the content in the scroll view completed. The scroll view also calls this method after any “bounce” animations. It also calls this method after animated changes to the zoom level and after a zoom-related gesture ends (regardless of whether the gesture resulted in a change to the zoom level).
- (Object) scrollViewDidScroll(scrollView)
Tells the delegate when the user scrolls the content view within the receiver. The delegate typically implements this method to obtain the change in content offset from scrollView and draw the affected portion of the content view.
- (Object) scrollViewDidScrollToTop(scrollView)
Tells the delegate that the scroll view scrolled to the top of the content. The scroll view sends this message when it finishes scrolling to the top of the content. It might call it immediately if the top of the content is already shown. 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.
- (Object) scrollViewDidZoom(scrollView)
Tells the delegate that the scroll view’s zoom factor changed.
- (Boolean) scrollViewShouldScrollToTop(scrollView)
Asks the delegate if the scroll view should scroll to the top of the content. 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.
- (Object) scrollViewWillBeginDecelerating(scrollView)
Tells the delegate that the scroll view is starting to decelerate the scrolling movement. The scroll view calls this method as the user’s finger touches up as it is moving during a scrolling operation; the scroll view will continue to move a short distance afterwards. The decelerating property of UIScrollView controls deceleration.
- (Object) scrollViewWillBeginDragging(scrollView)
Tells the delegate when the scroll view is about to start scrolling the content. The delegate might not receive this message until dragging has occurred over a small distance.
- (Object) scrollViewWillBeginZooming(scrollView, withView:view)
Tells the delegate that zooming of the content in the scroll view is about to commence. This method is called at the beginning of zoom gestures and in cases where a change in zoom level is to be animated. You can use this method to store state information or perform any additional actions prior to zooming the view’s content.
- (Object) scrollViewWillEndDragging(scrollView, withVelocity:velocity, targetContentOffset:targetContentOffset)
Tells the delegate when the user finishes scrolling the content. This method is not called when the value of the scroll view’s pagingEnabled property is YES. Your application can change the value of the targetContentOffset parameter to adjust where the scrollview finishes its scrolling animation.
- (UIView) viewForZoomingInScrollView(scrollView)
Asks the delegate for the view to scale when zooming is about to occur in the scroll view.