Setting a basic footer to a UITableView
How is a basic footer set to a UITableView programmatically?
Just a centered text?
EDIT:
How can the bar color be set and the footer bar position fixed to the bottom of the s开发者_如何学JAVAcreen or if the thumbs dont fill a screen, the footer isnt above the bottom of the screen.
viewForFooterInSection sets the section's footer. To set the table's footer, you want to set
self.tableView.tableFooterView = myCustomFooterView
where myCustomFooterView is something you setup elsewhere. You'd probably set that in viewDidLoad.
You can use UITableViewDataSource callback (just text):
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
Or UITableViewDelegate (any custom view you like):
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
精彩评论