ScrollView/ScrollViewDelegate, scrollview
UIScrollView
1. contentOffset
/** The content is offset outward. It is valid only in the initial state. After pulling, the offset is changed back to 0 */
@ Property (nonatomic) CGPoint contentOffset
2. contentSize
/** Content size */
@ Property (nonatomic) CGSize contentSize
3. contentInset
/** Content offset inwards, always valid */
@ Property (nonatomic) UIEdgeInsets contentInset
4. scrollEnabled
/** Rolling */
@ Property (nonatomic, getter = isScrollEnabled) BOOL scrollEnabled
5. direlocklockenabled
/** Whether vertical and horizontal pull at the same time is supported. Default support */
@ Property (nonatomic, getter = isDirectionalLockEnabled) BOOL directionalLockEnabled
Discussion
If this property is NO, scrolling is permitted in both horizontal and vertical directions ctions. if this property is YES and the user begins dragging in one general direction (horizontally or vertically), the scroll view disables scrolling in the other direction. if the drag direction is diagonal, then scrolling will not be locked and the user can drag in any direction until the drag completes. the default value is NO
6. pageEnabled
/** The final position of the Scroll will be at the integer multiple position */
@ Property (nonatomic, getter = isPagingEnabled) BOOL pagingEnabled
7. bounces
/** Whether a boundary will hit or not. The default value is YES */
@ Property (nonatomic) BOOL bounces
8. decelerationRate
/** Speed of downgrading after rolling */
@ Property (nonatomic) CGFloat decelerationRate
Discussion
Your application can use the UIScrollViewDecelerationRateNormal and UIScrollViewDecelerationRateFast constants as reference points for reasonable deceleration rates.
9. tracking/dragging/decelerating
/** Tracking occurs when you just touch the screen, while dragging occurs when you drag and drop, and decelerating occurs when the mobile device is released and still rolled */
@ Property (nonatomic, readonly, getter = isTracking) BOOL tracking
@ Property (nonatomic, readonly, getter = isDragging) BOOL dragging
@ Property (nonatomic, readonly, getter = isDecelerating) BOOL decelerating
10. indicatorStyle
/** Scroll bar Style */
@ Property (nonatomic) UIScrollViewIndicatorStyle indicatorStyle
Default Style
Typedef enum: NSInteger {
UIScrollViewIndicatorStyleDefault,
UIScrollViewIndicatorStyleBlack,
UIScrollViewIndicatorStyleWhite
} UIScrollViewIndicatorStyle;
11. scrollIndicatorInsets
/** Embedded distance of the scroll bar */
@ Property (nonatomic) UIEdgeInsets scrollIndicatorInsets
12. showsHorizontalScrollIndicator/VerticalScrollIndicator
/** Whether to display the scroll bar */
@ Property (nonatomic) BOOL showsHorizontalScrollIndicator
@ Property (nonatomic) BOOL showsVerticalScrollIndicator
13. flashScrollIndicators
/** Call the display scroll bar at the beginning */
-(Void) flashScrollIndicators
Discussion
You shoshould call this method whenever you bring the scroll view to front.
14. delegate
/** Proxy */
@ Property (nonatomic, assign) id <UIScrollViewDelegate> delegate
Discussion
The delegate must adopt the UIScrollViewDelegate protocol.
15. keyboardDismissMode
/** Time when the keyboard disappears */
@ Property (nonatomic) UIScrollViewKeyboardDismissMode keyboardDismissMode
The default value is None.
Typedef enum: NSInteger {
UIScrollViewKeyboardDismissModeNone,
UIScrollViewKeyboardDismissModeOnDrag,
UIScrollViewKeyboardDismissModeInteractive
} UIScrollViewKeyboardDismissMode;
UIScrollViewDelegate
1. Dragging and Scrolling
-(Void) scrollViewWillBeginDragging :( UIScrollView *)ScrollView
-(Void) scrollViewDidScroll :( UIScrollView *)ScrollView
-(Void) scrollViewWillEndDragging :( UIScrollView *)ScrollViewWithVelocity :( CGPoint)VelocityTargetContentOffset :( inout CGPoint *)TargetContentOffset
-(Void) scrollViewDidEndDragging :( UIScrollView *)ScrollViewWillDecelerate :( BOOL)Decelerate
-(BOOL) scrollViewShouldScrollToTop :( UIScrollView *)ScrollView
-(Void) scrollViewDidScrollToTop :( UIScrollView *)ScrollView
-(Void) scrollViewWillBeginDecelerating :( UIScrollView *)ScrollView
-(Void) scrollViewDidEndDecelerating :( UIScrollView *)ScrollView
-(Void) scrollViewDidEndScrollingAnimation :( UIScrollView *)ScrollView
The scroll view callthis method at the end of its implementations of the setContentOffset: animated: and scrollRectToVisible: animated: methods, but only if animations are requested.
2. Zooming
-(UIView *) viewForZoomingInScrollView :( UIScrollView *)ScrollView
Return Value
A UIView object that will be scaled as a result of the zooming gesture. Return nil if you don't want zooming to occur.
-(Void) scrollViewWillBeginZooming :( UIScrollView *)ScrollViewWithView :( UIView *)View
-(Void) scrollViewDidEndZooming :( UIScrollView *)ScrollViewWithView :( UIView *)ViewAtScale :( CGFloat)Scale
-(Void) scrollViewDidZoom :( UIScrollView *)ScrollView