UIScrollView是IOS中一个可以滚动的控件,UITableView也是它的子类,很多主流的应用都有help帮助页面,就是通过UIScrollView实现
UIScrollView常用的属性的整理
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
scrollView.contentSize = CGSizeMake(self.view.frame.size.width * 3, 0);
scrollView.contentOffset = CGPointMake(320 / 2, 0);
scrollView.contentInset = UIEdgeInsetsMake(top, left, bottom, right>);
scrollView.bounces = NO;
scrollView.bouncesZoom = NO;
scrollView.showsHorizontalScrollIndicator = NO;
scrollView.showsVerticalScrollIndicator = NO;
scrollView.pagingEnabled = YES;
scrollView.scrollEnabled = YES;
scrollView.alwaysBounceHorizontal = NO;
scrollView.alwaysBounceVertical = NO;
scrollView.directionalLockEnabled = NO;
scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
float decelerationRate | 改变scrollerView的减速点位置 |
BOOL tracking | 监控当前目标是否正在被跟踪 |
BOOL dragging | 监控当前目标是否正在被拖拽 |
BOOL decelerating | 监控当前目标是否正在减速 |
BOOL delaysContentTouches | 控制视图是否延时调用开始滚动的方法 |
BOOL canCancelContentTouches | 控制控件是否接触取消touch的事件 |
float minimumZoomScale | 缩小的最小比例 |
float maximumZoomScale | 放大的最大比例 |
float zoomScale | 设置变化比例 |
BOOL zooming | 判断控件的大小是否正在改变 |
BOOL zoomBouncing | 判断是否正在进行缩放反弹 |
BOOL scrollsToTop | 控制控件滚动到顶部 |