zoukankan      html  css  js  c++  java
  • iOS UITableView在 UITableViewStyleGrouped样式下第一组组头变高问题

    UITableView在 UITableViewStyleGrouped样式下第一组组头莫名变高,针对这个问题有以下两种方式处理

    1、直接设置contentInset,不推荐这个方法,虽然能够解决问题

    self.homeTableView.contentInset = UIEdgeInsetsMake(-36, 0, 0, 0);

    2、通过UITableViewDelegate代理方法实现,不要试图设置为0,会不起作用

    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
        return nil;
        
    }
    
    - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
        return 0.001;
        
    }
  • 相关阅读:
    学习python第二天
    学习python第一天
    SQL操作
    JAR规范 JAR File Specification
    IDEA快捷键
    Fibonacci数列
    AnyHandler
    测试UDP
    Eclipse卡顿设置
    服务器初始化操作
  • 原文地址:https://www.cnblogs.com/lijianyi/p/11492558.html
Copyright © 2011-2022 走看看