美文网首页
判断scrollView是否滚动到底部

判断scrollView是否滚动到底部

作者: 白貂 | 来源:发表于2017-09-04 14:13 被阅读0次

-(void)scrollViewDidScroll:(UIScrollView*)scrollView

{

CGFloat height = scrollView.frame.size.height;

CGFloat contentOffsetY = scrollView.contentOffset.y;

CGFloat bottomOffset = scrollView.contentSize.height- contentOffsetY;

if(bottomOffset <= height)

{

//在最底部

self.currentIsInBottom=YES;

}

else

{

self.currentIsInBottom=NO;

}

}

参考文章:http://blog.csdn.net/glt_code/article/details/53423195/

相关文章

网友评论

      本文标题:判断scrollView是否滚动到底部

      本文链接:https://www.haomeiwen.com/subject/edkejxtx.html