让UITableView的section header view不悬停的方法
来源:互联网 发布:网络社交平台的特点 编辑:程序博客网 时间:2024/05/21 06:42
当 UITableView
的 style
属性设置为 Plain
时,这个tableview的section header在滚动时会默认悬停在界面顶端。取消这一特性的方法有两种:
- 将
style
设置为Grouped
。这时所有的section header都会随着scrollview滚动了。不过grouped
和plain
的样式有轻微区别,切换样式后也许需要重新调整UI - 重载scrollview的delegate方法
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat sectionHeaderHeight = 40; 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); }}
0 0
- 让UITableView的section header view不悬停的方法
- 让UITableView的section header view不悬停的方法
- 让UITableView的section header view不悬停的方法
- 让UITableView的section header view不悬停的方法
- 让UITableView的section header view不悬停的方法
- 让UITableView的section header view不悬停,让UITableView的section headerview取消粘性
- UITableView的section header view悬停和取消的方法
- 如何让UITableView的section headerView不悬停
- 让UITableView的headerview不悬停的方法
- UITableView Section 不悬停
- [iOS] tableview的section不悬停的方法
- 修改UITableView section header title的样式
- 去掉UITableView的section的粘性,使其不会悬停
- iOS UITableView:section的Header以及Footer不悬浮停留在屏幕的方法(非在scrollView代理实现的方法)
- UICollectionView的header悬停
- 去掉UITableView Section上Header的粘滞效果
- IOS-UITableView手动添加时,Header Section的背景设置
- 关于UITableView中每个section的header显示
- MFC编程之创建MFC项目程序执行流程
- 【网络/通信】概念的理解 —— 带宽、吞吐量、净荷
- Lumen artisan vendor不能执行问题,已解决
- 最快让你上手ReactiveCocoa之基础篇
- Ajax之同步请求和异步请求的区别
- 让UITableView的section header view不悬停的方法
- Mac安装Meld,并使用Meld作为git merge tool的工具
- SprinMVC-高级参数绑定、@RequestMapping注解、Controller方法返回等
- redis安装(centos源码包安装)
- 视图
- 跟我学JavaScript--类型转换
- c语言函数sscanf()和sprintf()
- 视图
- 读取指定文件夹下所有文件并保存