简体   繁体   English

在uitableview中,tablefooter的大小没有增加

[英]Size of tablefooter not increasing in uitableview

The size of the table footer is not increasing, it seems like it is fixed by default. 表页脚的大小没有增加,默认情况下似乎是固定的。 How can we change it ? 我们如何改变它? I am using the below mentioned code for this but it is not working. 我为此使用了下面提到的代码,但是它不起作用。 Can anyone help me in this ? 有人可以帮我吗? Thanks in Advance. 提前致谢。

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {

    UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 200)] autorelease];
    view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blue-bg.jpg"]];
    return view;

}

In your .h file where you confirm to the UITableViewDelegate, You can press the command button and then click on UITableViewDelegate and it will take you to the protocol where you can find all the relevant methods that you can use to customize your table view. 在您要确认UITableViewDelegate的.h文件中,可以按命令按钮,然后单击UITableViewDelegate,它将带您进入协议,在该协议中可以找到可用于自定义表格视图的所有相关方法。 And yes the way how to do it is already being answered. 是的,如何做到这一点已经得到了解答。 Good luck!! 祝好运!! Cheers!! 干杯!!

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 50;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM