tableview Footerview有多余的间距

本文介绍了一种在iOS开发中调整UITableView footerView高度的方法。通过创建一个UIView并设置其frame大小,然后添加一个UILabel作为子视图来显示“已经到底啦~”的文字,最后将这个UIView设置为tableView的tableFooterView,从而实现footerView的高度调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

调整footerView的高度

        UIView *footerV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, Main_Screen_Width, 1)];
        UILabel *footerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, Main_Screen_Width, 10)];
        [footerV addSubview:footerLabel];
        footerLabel.text = @"已经到底啦~";
        footerLabel.textAlignment = NSTextAlignmentCenter;
        footerLabel.textColor = RGBCOLOR(150, 150, 150);
        footerLabel.font = [UIFont boldSystemFontOfSize:13];
        self.tableView.tableFooterView = footerV;

 

转载于:https://www.cnblogs.com/tufei7/p/10681038.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值