标签:ios开发 app ios xcode uiscrollview
- (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不会悬浮
自己做个笔记
也希望对您有帮助。
标签:ios开发 app ios xcode uiscrollview
原文地址:http://blog.csdn.net/u014632353/article/details/46475701