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.)
  • 相关阅读:
    一个Bean属性拷贝的工具类
    java Integer parseInt()
    sql 预编译 in
    显著性图谱的评价
    如何优雅的在MFC中使用cvSetMouseCallback?
    为MFC界面添加一个Log Window
    最大流算法统计
    2014年秋 求职总结
    图论的常用算法
    常用的排序算法
  • 原文地址:https://www.cnblogs.com/SnailFish/p/3054238.html
Copyright © 2011-2022 走看看