让TableViewSection在Plan的模式下不悬浮
时间:2015-06-13 09:55:42
收藏:0
阅读:193
- (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);
}
}
}
在使用到的TableView中加入ScrollView这个代理方法。
在Plan的模式下
Section不会悬浮
自己做个笔记
也希望对您有帮助。
原文:http://blog.csdn.net/u014632353/article/details/46475701
评论(0)