美文网首页ios开发记录
iOS 根据判断UITableView或者UIScrollVie

iOS 根据判断UITableView或者UIScrollVie

作者: selice | 来源:发表于2019-05-20 10:02 被阅读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;
    }
}


相关文章

网友评论

    本文标题:iOS 根据判断UITableView或者UIScrollVie

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