Mateus
Mateus

Reputation: 2668

UITableViewCell bottom information text

How can add some information text ('Please note that...') to the bottom of a uitableviewcell, just like in this image:

enter image description here

Upvotes: 0

Views: 421

Answers (2)

matt
matt

Reputation: 535138

What you are looking at in that screen shot is not part of any UITableViewCell. It is the table's footer (a feature of the table). Try making a UILabel containing your desired content and setting it to the table's tableFooterView.

Upvotes: 2

username tbd
username tbd

Reputation: 9382

You should give - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section a try:

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
    if (section == 0) {
        return @"This text is below the TableView!";
    }
    return nil;
}

Additional documentation can be found here.

Upvotes: 2

Related Questions