UITableView的plain样式下,取消区头停滞效果

核心代码

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

  CGFloat sectionHeaderHeight
= sectionHead.height; // 区头高度   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);   } }
posted @ 2018-04-03 10:43  chihbun  阅读(315)  评论(0编辑  收藏  举报