ios - UITableView:如何将页脚附加到具有分组动态原型(prototype)单元格的部分?

标签 ios swift uitableview

我正在尝试为具有分组动态原型(prototype)单元格 (Swift) 的部分创建页脚。

它适用于静态单元格,Storyboard 中甚至有控件,但这也适用于动态填充的 tableView 吗?

我在我的应用程序中同时使用了带有静态和动态单元格的 tableView,但我希望它们看起来相似。

非常感谢您的帮助。

最佳答案

原来我只需要将这个方法实现到包含这个 tableView 的 viewController 中:

override func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? {
    return "This will appear in footer styling below the section."
}

关于ios - UITableView:如何将页脚附加到具有分组动态原型(prototype)单元格的部分?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35131833/

相关文章:

iOS 框架构建 : what is the best practice to link with third-party libraries?

swift - 如何快速上传图像文件到FTP服务器?

ios - 加载仅在按钮功能后显示的动画(Swift)

objective-c - 在 Xcode 重构时忽略 Pod?

ios - 如何在快速更改 UISwitch 时隐藏 UITableViewController 中的特定部分

ios - [tableView 重新加载数据];在我滚动 tableView 之前不起作用

iphone - iOS 确定 VoiceOver 是否仍在说话

ios - 获取 slider 的当前时间并播放歌曲

ios - 多个具有 .round lineCap 的 CAShapeLayers 相互重叠

ios - 单击切换按钮展开/折叠 UITableViewCell 高度