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);
}
}
}
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);
}
}
}
相关文章推荐
- (NO.00005)iOS实现炸弹人游戏(二):素材选择的取舍
- (NO.00005)iOS实现炸弹人游戏(二):素材选择的取舍
- (NO.00005)iOS实现炸弹人游戏(二):素材选择的取舍
- iOS开发之设计模式(一)
- ios runtime 动态注册一个新类 增加一个方法
- iOS MagicRecord 详解
- iOS 项目的目录结构能看出你的开发经验
- iOS 学会使用delegate和block<一>
- iOS去掉html 的转义符号
- iOS实现图片高斯模糊
- iOS怎么获取设置是否开启消息通知
- iOS邮件
- iOS中把tableviewcell设置成圆角
- iOS开发 如何使用Leak检查内存泄漏
- IOS版添加phonegap-银联支付插件教程
- iOS26 AFNetworking
- 深入理解Grand Central Dispatch (GCD)(一)
- iOS开发系列--数据存取
- iOS开发系列--地图与定位
- iOS验证手机号的正则表达式