iOS中的UITableViewCell页脚文本

Fir*_*ist 2 cocoa-touch uitableview ios

我想做跟随照片.

在此输入图像描述

我该怎么做呢?

是以下方法吗?

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
Run Code Online (Sandbox Code Playgroud)

谢谢.

T0m*_*Twt 7

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    UIView *footer = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 540, 10)];
    footer.backgroundColor = [UIColor clearColor];

    UILabel *lbl = [[UILabel alloc]initWithFrame:footer.frame];
    lbl.backgroundColor = [UIColor clearColor];
    lbl.text = @"Your Text";
    lbl.textAlignment = NSTextAlignmentCenter;
    [footer addSubview:lbl];

    return footer;
}


- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 10.0;
}
Run Code Online (Sandbox Code Playgroud)