- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
CGFloat sectionHeaderHeight = 50;
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区头滚动
最新推荐文章于 2022-09-06 21:53:38 发布