//去掉 UItableview headerview 黏性(sticky) - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView == self.tableViewOrder) { CGFloat sectionHeaderHeight = 60; //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); } } }
IOS 去除 tableView 中 headerView 吸附头部,不整体滚动
原文:http://my.oschina.net/jack088/blog/512934