简体   繁体   中英

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. And yes the way how to do it is already being answered. Good luck!! Cheers!!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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