zoukankan      html  css  js  c++  java
  • 去掉UITableView HeaderView或FooterView随tableView 移动的黏性

    去掉UITableView HeaderView或FooterView随tableView 移动的黏性(sticky)

    控制器中实现以下方法即可:

     1 - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
     2 
     3     CGFloat sectionHeaderHeight = 40;
     4 
     5     if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
     6 
     7         scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
     8 
     9     } else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
    10 
    11         scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
    12 
    13     }
    14 
    15 }
  • 相关阅读:
    jps命令
    Collection
    java.lang包中异常
    final关键字
    JVM运行时数据区域
    String详解
    哈希码
    Java虚拟机
    垃圾收集器与内存分配策略
    solr简介
  • 原文地址:https://www.cnblogs.com/myios/p/4024875.html
Copyright © 2011-2022 走看看