`
wang_peng1
  • 浏览: 3902486 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

scroll判断滑到顶部

 
阅读更多
tep 1:

   yourUITableView.delegate = self;
Step 2:

   CGFloat yOffset = 0.0;
Step 3:

 -(void)scrollViewDidScroll:(UIScrollView *)scrollView
        {
            if (scrollView.contentOffset.y < yOffset) {

                // scrolls down.
                yOffset = scrollView.contentOffset.y;
            }
            else
            {
                // scrolls up.
                yOffset = scrollView.contentOffset.y;

                // Your Action goes here...
            }

        }

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics