Iphone 将基本页脚设置为UITableView

Iphone 将基本页脚设置为UITableView,iphone,uitableview,Iphone,Uitableview,如何以编程方式将基本页脚设置为UITableView 只是一个居中的文本 编辑: 如何设置栏颜色和将页脚栏位置固定到屏幕底部,或者如果拇指没有填满屏幕,则页脚不在屏幕底部上方 您可以使用UITableViewDataSource回调(仅文本): 或UITableViewDelegate(您喜欢的任何自定义视图): viewForFooterInSection设置节的页脚。要设置表的页脚,请设置 self.tableView.tableFooterView = myCustomFooterView

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

只是一个居中的文本

编辑:

如何设置栏颜色和将页脚栏位置固定到屏幕底部,或者如果拇指没有填满屏幕,则页脚不在屏幕底部上方


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

或UITableViewDelegate(您喜欢的任何自定义视图):


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

self.tableView.tableFooterView = myCustomFooterView

其中myCustomFooterView是您在别处设置的内容。您可能会在viewDidLoad中进行设置。

可以设置页脚的颜色吗?例如UIBarStyleBlack。如果返回视图,则可以指定任何颜色,但如果使用文本,则颜色将约束为表格样式。您可以通过-(CGFloat)tableView:(UITableView*)tableView HeightForRowatineXpath:(NSIndexPath*)IndeXpath返回等于屏幕大小的高度。customFooterView设置如何?
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
self.tableView.tableFooterView = myCustomFooterView