zoukankan      html  css  js  c++  java
  • 处理TableVIew SectionHeader悬停问题

    1,plain类型的tableview  才会悬停  grouped类型不会悬停

    2,通过改变contentInset达到部分悬停遮罩的处理,对所有的Sectionheader都有效,不可以单独处理某一个sectionheader

    - (void)scrollViewDidScroll:(UIScrollView *)scrollView

    {

        

            CGFloat sectionHeaderHeight = XX;

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

        }

    }

  • 相关阅读:
    Delphi防止同时出现多个应用程序实例CreateMutex
    DLL注入代码
    DLL注入代码
    C语言学习笔记
    随笔
    存储器简介
    随笔
    对偶问题的基本性质
    C语言学习笔记
    对偶问题的基本性质
  • 原文地址:https://www.cnblogs.com/huaida/p/11637959.html
Copyright © 2011-2022 走看看