国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ScrollView/ScrollViewDelegate

2019-11-14 18:10:30
字體:
來源:轉載
供稿:網友

UIScrollView

 

1.contentOffset

/** 內容向外偏移,只在初始狀態有效,拉拽后偏移量變回0*/

@PRoperty(nonatomic) CGPoint contentOffset

 

2.contentSize

/** 內容大小*/

@property(nonatomic) CGSize contentSize

 

3.contentInset

/** 內容向內偏移,一直有效*/

@property(nonatomic) UIEdgeInsets contentInset

 

4.scrollEnabled

/** 滾動可否*/

@property(nonatomic, getter=isScrollEnabled) BOOL scrollEnabled

 

5.directionLockEnabled

/** 是否支持同一時間垂直水平同時可拉拽,默認支持*/

@property(nonatomic, getter=isDirectionalLockEnabled) BOOL directionalLockEnabled

Discussion

If this property is NO, scrolling is permitted in both horizontal and vertical directions. 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

/** 滾動時最后會停在整數倍位置*/

@property(nonatomic, getter=isPagingEnabled) BOOL pagingEnabled

 

7.bounces

/** 遇到邊界是否會碰撞返回,默認YES*/

@property(nonatomic) BOOL bounces

 

8.decelerationRate

/** 滾動后減速的速度*/

@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發生在剛接觸屏幕,dragging發生在拖拽時,decelerating發生在手松開后還滾動的時候*/

@property(nonatomic, readonly, getter=isTracking) BOOL tracking

@property(nonatomic, readonly, getter=isDragging) BOOL dragging

@property(nonatomic, readonly, getter=isDecelerating) BOOL decelerating

 

10.indicatorStyle

/** 滾動條Style*/

@property(nonatomic) UIScrollViewIndicatorStyle indicatorStyle

默認Default樣式

typedef enum : NSInteger {

   UIScrollViewIndicatorStyleDefault,

   UIScrollViewIndicatorStyleBlack,

   UIScrollViewIndicatorStyleWhite 

} UIScrollViewIndicatorStyle;

 

11.scrollIndicatorInsets

/** 滾動條內嵌距離*/

@property(nonatomic) UIEdgeInsets scrollIndicatorInsets

 

12.showsHorizontalScrollIndicator/VerticalScrollIndicator

/** 是否顯示滾動條*/

@property(nonatomic) BOOL showsHorizontalScrollIndicator

@property(nonatomic) BOOL showsVerticalScrollIndicator

 

13.FlashScrollIndicators

/** 顯示滾動條在最前面時調用*/

- (void)flashScrollIndicators

Discussion

You should call this method whenever you bring the scroll view to front.

 

14.delegate

/** 代理*/

@property(nonatomic, assign) id< UIScrollViewDelegate > delegate

Discussion

The delegate must adopt the UIScrollViewDelegate protocol. 

 

15.keyboardDismissMode

/** 鍵盤消失時間*/

@property(nonatomic) UIScrollViewKeyboardDismissMode keyboardDismissMode

默認None

typedef enum : NSInteger {

   UIScrollViewKeyboardDismissModeNone,

   UIScrollViewKeyboardDismissModeOnDrag,

   UIScrollViewKeyboardDismissModeInteractive 

}UIScrollViewKeyboardDismissMode;

 

UIScrollViewDelegate

 

1.Dragging and Scrolling

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView

- (void)scrollViewDidScroll:(UIScrollView *)scrollView

- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(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 calls this 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 *)scrollView withView:(UIView *)view

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale

- (void)scrollViewDidZoom:(UIScrollView *)scrollView

 


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鹿泉市| 出国| 揭阳市| 纳雍县| 永康市| 沽源县| 根河市| 乳山市| 县级市| 兴宁市| 吴江市| 高淳县| 富民县| 昌宁县| 日照市| 延安市| 玉山县| 密云县| 博罗县| 萨迦县| 富川| 利川市| 乃东县| 浮山县| 临高县| 澎湖县| 同心县| 六安市| 汉中市| 囊谦县| 延长县| 惠来县| 舟曲县| 新晃| 汝城县| 辉南县| 东海县| 微山县| 天峻县| 和政县| 沭阳县|