UIScrollViewDelegate的回调方法解析

- (void)scrollViewDidScroll:(UIScrollView *)scrollView;              //当视图滚动时                              

- (void)scrollViewDidZoom:(UIScrollView *)scrollView//当视图缩放结束时

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;//即将开始拖拽视图时

- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset//即将结束拖拽操作时

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;//当拖拽操作结束时

- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView;   //视图即将开始减速时

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView;     //视图减速完毕

- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView; //当滚动视图动画执行结束时,没添加动画不调用

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView; //视图缩放过程中调用,会多次调用

- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view; //视图开始缩放时调用

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale; //视图缩放结束,并且缩放比例回到minimumZoomScale与maximumZoomScale之间后(我们也许会超出缩放范围)调用

- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView;  //当用户点击状态栏时是否回到顶部(只有当滚动视图不在顶部时才会调用)

- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView;     //当视图回到顶部时调用


执行顺序:

scrollViewWillBeginDragging

scrollViewDidScroll

scrollViewWillEndDragging

scrollViewDidEndDragging

scrollViewWillBeginDecelerating

scrollViewDidScroll

scrollViewDidEndDecelerating

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值