去掉UItableview headerview黏性
2016-05-30 18:07
337 查看
//// 去掉UItableview headerview黏性
//- (void)scrollViewDidScroll:(UIScrollView *)scrollView
//{
// CGFloat sectionHeaderHeight = 100;
// 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);
// }
//}
//-(void)scrollViewDidScroll:(UIScrollView *)scrollView
//{
//
// if (scrollView.tag == 100102) {
// UITableView *tableview = (UITableView *)scrollView;
// CGFloat sectionHeaderHeight = 50;
// CGFloat sectionFooterHeight = 10;
// CGFloat offsetY = tableview.contentOffset.y;
// if (offsetY >= 0 && offsetY <= sectionHeaderHeight)
// {
// tableview.contentInset = UIEdgeInsetsMake(-offsetY, 0, -sectionFooterHeight, 0);
// }else if (offsetY >= sectionHeaderHeight && offsetY <= tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight)
// {
// tableview.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, -sectionFooterHeight, 0);
// }else if (offsetY >= tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight && offsetY <= tableview.contentSize.height - tableview.frame.size.height)
// {
// tableview.contentInset = UIEdgeInsetsMake(-offsetY, 0, -(tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight), 0);
// }
// }
//}
//- (void)scrollViewDidScroll:(UIScrollView *)scrollView
//{
// CGFloat sectionHeaderHeight = 100;
// 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);
// }
//}
//-(void)scrollViewDidScroll:(UIScrollView *)scrollView
//{
//
// if (scrollView.tag == 100102) {
// UITableView *tableview = (UITableView *)scrollView;
// CGFloat sectionHeaderHeight = 50;
// CGFloat sectionFooterHeight = 10;
// CGFloat offsetY = tableview.contentOffset.y;
// if (offsetY >= 0 && offsetY <= sectionHeaderHeight)
// {
// tableview.contentInset = UIEdgeInsetsMake(-offsetY, 0, -sectionFooterHeight, 0);
// }else if (offsetY >= sectionHeaderHeight && offsetY <= tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight)
// {
// tableview.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, -sectionFooterHeight, 0);
// }else if (offsetY >= tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight && offsetY <= tableview.contentSize.height - tableview.frame.size.height)
// {
// tableview.contentInset = UIEdgeInsetsMake(-offsetY, 0, -(tableview.contentSize.height - tableview.frame.size.height - sectionFooterHeight), 0);
// }
// }
//}
相关文章推荐
- UICollectionView 内容不足时 滚动
- PAT 1017 Queueing at Bank (模拟)
- PAT 1017 Queueing at Bank (模拟)
- Android中 requestCode与resultCode的区别与用法
- spark UI 显示已完成应用的历史信息
- 第二条 多构造参数用 Builder模式
- Android Bluetooth蓝牙技术基础讲解
- EasyUI DataGrid 时间格式化
- [GitHub的搬运工]roboguice的一个简单的例子
- iOS9 UITableViewCell 分割线左顶头
- UE使用123
- Java中String、StringBuffer、StringBuilder的区别
- UEFI抢占机制
- poj3094 Quicksum
- Android 教你打造炫酷的ViewPagerIndicator 不仅仅是高仿MIUI
- Packet for query is too large(mysql查询数据过大)
- QuickHit
- easyui 中 的同步树(1)
- UIImage 拉伸方法
- 存储过程 返回值 procedure return values