开发者

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.

Setting a basic footer to a UITableView


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜