您的位置:首页 > 移动开发 > IOS开发

ios tableview section标题不滑动问题

2015-12-22 13:06 330 查看
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView ==_tableView)
{
CGFloat sectionHeaderHeight = 25;
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);
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: