IOS 去除 tableView 中 headerView 吸附头部,不整体滚动
2015-09-30 00:00
441 查看
摘要: IOS 去除 tableView 中 headerView 吸附头部,不整体滚动
//去掉 UItableview headerview 黏性(sticky) - (void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView == self.tableViewOrder) { CGFloat sectionHeaderHeight = 60; //sectionHeaderHeight 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 开发----CGAffineTransform平移,旋转,缩放
- ios开发 17个常用代码整理
- iOS开发 代码重构心得
- iOS 第三方框架-SDWebImage
- 斯坦福iOS7 2013-2014秋Assignment 6的一种答案 #4
- ios-地图-自定义大头针
- iOS 线程
- 长按、捏合、旋转手势的组合应用及ios8新特性
- iOS 内嵌 View 的响应
- iOS开发 ----- 上拉加载
- iOS开发 ----- 下拉刷新
- IOS - PDF合并 - 转
- iOS关于通讯录的实现
- iOS开发中对OC字符串的相关操作<转>
- iOS Framework
- iOS 自定义cell(思路,以及详细步骤)
- iOS 核心动画2
- iOS 核心动画-1
- iOS中各种动画分类
- ios 内存小结