zoukankan      html  css  js  c++  java
  • 清除UITableView底部多余的分割线

    出处:http://kongbei888.blog.163.com/blog/static/243266132012410104414609/

    1、加方法
    -(void)setExtraCellLineHidden: (UITableView *)tableView
    {
        UIView *view = [UIView new];
        view.backgroundColor = [UIColor clearColor];
        [tableView setTableFooterView:view];
        [view release];
    }
     
    2、在

    - (void)viewDidLoad

    {

        [super viewDidLoad];

        //设置tableView不能滚动

        [self.tableView setScrollEnabled:NO];

        //在此处调用一下就可以啦 :此处假设tableView的name叫:tableView

        [self setExtraCellLineHidden:self.tableView];

    }

    在iOS4.3和iOS5.0中通过:值得注意的是在iOS4.3中可以直接设置footer为nil,但是在5.0不行,因为UITableView会默认生成一个Footer。(详见iOS Release Notes中的说明:Returning nil from the tableView:viewForHeaderInSection: method (or its footer equivalent) is no longer sufficient to hide a header. You must override tableView:heightForHeaderInSection: and return 0.0 to hide a header.)
  • 相关阅读:
    py基础之模块与包
    py装饰器,生成器,迭代器
    py函数式编程
    py基础之列表生成式
    算法基础之递归算法
    Py基础之函数
    py基础之无序列表
    py基础之数据类型及基本语法
    jsp报错问题汇总
    mysql问题汇总
  • 原文地址:https://www.cnblogs.com/SnailFish/p/3054238.html
Copyright © 2011-2022 走看看