首页 > 其他 > 详细

tableView的plain样式的headerView的上拉过程中悬停解决方法

时间:2016-07-15 17:12:51      阅读:309      评论:0      收藏:0      [点我收藏+]

//去掉UItableview headerview黏性(sticky) 去掉header的浮动效果

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

    if (scrollView == self.tableView)

    {

        CGFloat sectionHeaderHeight = 100; //sectionHeaderHeight

        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);

        }

    }

}

 

tableView的plain样式的headerView的上拉过程中悬停解决方法

原文:http://www.cnblogs.com/Ninesday/p/5674017.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!