我只想在TableView
。在TableView
的最後一節,以顯示頁腳文本我有很多TableView
部分的它來自API.But我只需要在部分的tableView如何做到這一點的底部顯示頁腳信息?如何僅在tableview的文本最後一部分添加頁腳文本?
(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;
}
目前即時通訊使用此代碼。此節目中的所有部分bottom.I只需要在最後的tableview部分的底部顯示。
有關添加頁腳'Tableview'本身是什麼。 – Akhilrajtr
我需要在最後一節顯示一些文本 –
我正在使用Section tableview可以告訴我如何在tableView本身實現? –