标签:style color io os ar sp c on cti
#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)?
标签:style color io os ar sp c on cti
原文地址:http://blog.csdn.net/alincexiaohao/article/details/39891153