iOS中的Navigable UITableView部分页脚?

时间:2013-06-12 06:17:16

标签: ios footer user-interaction uitableview

我想实现一个类似于现有应用程序的“登录”表单,例如:

Twitter Dropbox

屏幕截图来自Twitter和Dropbox。 “忘记密码?”选项是可点击的,它导航到另一个视图。我想制作类似的东西,但我不确定是否有这样的“忘记密码?” text是分组UITableView的页脚:我一直在文档中搜索是否可以在页脚中启用用户交互,但我找不到任何相关内容。或者它可能是UILabel?我怎么能这样做?

谢谢!

2 个答案:

答案 0 :(得分:0)

您可以覆盖方法- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

在那里你可以创建一个带有标签,按钮或任何你需要的视图..同样适用于带有- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section的标题

答案 1 :(得分:0)

实施委托方法

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

然后使用“忘记密码”标题创建UIButton,将其作为子视图添加到UIView并将该视图作为页脚视图返回。

相关问题