| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iPhone OS 2.0 and later. |
| Declared in | UIScrollView.h |
| Related sample code |
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.
– scrollViewDidScroll:
– scrollViewWillBeginDragging:
– scrollViewDidEndDragging:willDecelerate:
– scrollViewShouldScrollToTop:
– scrollViewDidScrollToTop:
– scrollViewWillBeginDecelerating:
– scrollViewDidEndDecelerating:
Tells the delegate that the scroll view has ended decelerating the scrolling movement.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
The scroll-view object that is decelerating the scrolling of the content view.
The scroll view calls this method when the scrolling movement comes to a halt. The decelerating property of UIScrollView controls deceleration.
UIScrollView.hTells the delegate when dragging ended in the scroll view.
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
The scroll-view object that finished scrolling the content view.
YES if the scrolling movement will continue, but decelerate, after a touch-up gesture during a dragging operation. If the value is NO, scrolling stops immediately upon touch-up.
The scroll view sends this message when the user’s finger touches up after dragging content. The decelerating property of UIScrollView controls deceleration.
UIScrollView.hTells the delegate when a scrolling animation in the scroll view concludes.
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
The scroll-view object that is performing the scrolling animation.
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.
UIScrollView.hTells the delegate when zooming of the content in the scroll view completed.
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
The scroll-view object displaying the content view.
The view object representing that part of the content view that needs to be scaled.
The scale factor to use for scaling; this value must be between the limits established by the UIScrollView properties maximumZoomScale and minimumZoomScale.
The scroll view also calls this method after any “bounce” animations.
UIScrollView.hTells the delegate when the user scrolls the content view within the receiver.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
The scroll-view object in which the scrolling occurred.
The delegate typically implements this method to obtain the change in content offset from scrollView and draw the affected portion of the content view.
UIScrollView.hTells the delegate that the scroll view scrolled to the top of the content.
- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
The scroll-view object that perform the scrolling operation.
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.
UIScrollView.hAsks the delegate if the scroll view should scroll to the top of the content.
- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView
The scroll-view object requesting this information.
YES to permit scrolling to the top of the content, NO to disallow it.
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.
UIScrollView.hTells the delegate that the scroll view is starting to decelerate the scrolling movement.
- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
The scroll-view object that is decelerating the scrolling of the content view.
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.
UIScrollView.hTells the delegate when the scroll view is about to start scrolling the content.
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
The scroll-view object that is about to scroll the content view.
The delegate might not receive this message until dragging has occurred over a small distance.
UIScrollView.hAsks the delegate for the view to scale when zooming is about to occur in the scroll view.
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
The scroll-view object displaying the content view.
A UIView object that will be scaled as a result of the zooming gesture. Return nil if you don’t want zooming to occur.
UIScrollView.hLast updated: 2008-07-06