美文网首页
iOS - UITableView scrollView不

iOS - UITableView scrollView不

作者: HanZhiZzzzz | 来源:发表于2017-06-28 18:15 被阅读0次

// 滚动不停靠

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

    CGFloat sectionHeaderHeight = TASHeaderVH;
 if(scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
        scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
    } else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
        scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
    }
}

相关文章

网友评论

      本文标题:iOS - UITableView scrollView不

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