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...
            }

        }

猜你喜欢

转载自wang-peng1.iteye.com/blog/1867499