首页 > 移动平台 > 详细

iOS 去掉UItableview header(footer)view黏性(sticky)?

时间:2014-10-08 13:00:25      阅读:1157      评论:0      收藏:0      [点我收藏+]

#pragma mark -- UIScrollViewDelegate 代理

#pragma mark 去掉UItableview headerview黏性(sticky)

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

    CGFloat sectionHeaderHeight = 40;

    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 header(footer)view黏性(sticky)?

原文:http://blog.csdn.net/alincexiaohao/article/details/39891153

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