解决tableview下滑隐藏HeaderInSection的问题

来源:互联网 发布:通讯录软件 编辑:程序博客网 时间:2024/05/16 15:16
//去掉UItableview headerview黏性- (void)scrollViewDidScroll:(UIScrollView *)scrollView {            CGFloat sectionHeaderHeight = 10; //(UItableview  Section 的高度)    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);    }    }

0 0