您的位置:首页 > 产品设计 > UI/UE

uitableview去掉最后一行cell的底线

2016-07-11 14:49 399 查看
func tableView(tableView:
UITableView, heightForFooterInSection section:
Int) -> CGFloat {

        //2是最后一行

        if section ==
2{

            return
10

        }else{

            return
0

        }

    }

    func tableView(tableView:
UITableView, viewForFooterInSection section: Int) ->
UIView? {

        let sectionHeader =
UIView(frame: CGRectMake(0,
0, view.frame.width,
10))

        //这个颜色和tableview背景颜色一样

        sectionHeader.backgroundColor =
UIColor(red: 0.97, green:
0.97, blue: 0.97, alpha:
1.0)

        

        return sectionHeader

    }

如果不行,就把Footer换成header,多添加一个selection,这个我试过,行
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: