将基本页脚设置为UITableView

问题描述:

如何以编程方式将基本页脚设置为UITableView?将基本页脚设置为UITableView

只是居中的文字?

编辑:

如何指示条的颜色被设置并固定到屏幕的底部或如果拇指不填充屏幕,页脚心不是在屏幕的底部上方的页脚栏位置。

enter image description here

您可以使用UITableViewDataSource回调(只是文本):

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section 

或者的UITableViewDelegate(查看你喜欢的任何自定义):

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section 
+0

可以设置页脚的颜色吗?到例如UIBarStyleBlack。 – jarryd

+0

如果你要返回视图,那么你可以指定任何颜色,但如果你使用的是文本,那么颜色被限制为表格样式 – Max

+0

请检查我在编辑中的问题。 :) – jarryd

viewForFooterInSection设置节的页脚。要设置表的页脚,你要设置

self.tableView.tableFooterView = myCustomFooterView 

其中myCustomFooterView是你设置在其他地方。你可能会在viewDidLoad中设置它。

+0

customFooterView设置如何? – jarryd