zoukankan      html  css  js  c++  java
  • 去除表视图section的粘性问题

    //  去除section的粘性

     

    - (void)scrollViewDidScroll:(UIScrollView *)scrollView{

        

        if (scrollView == self.tableView) {

            

            CGFloat sectionHeaderHeight = 36;

            

            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);

            

            }

            

        }

        

        

    }

  • 相关阅读:
    基础数据类型补充
    编码转换
    is 和 == 的区别
    字典 dict
    列表与元组
    python基础第一节
    poll函数
    基本 TCP 的回射服务器
    文件IO
    base | AtomicIntegerT类
  • 原文地址:https://www.cnblogs.com/pengsi/p/5363133.html
Copyright © 2011-2022 走看看