ios - UITableView 部分页脚文本与 Swift

标签 ios swift uitableview

我有一个 TableView ,其中有许多部分,这些部分的行数是动态创建的。

我想将页脚文本添加到 UITableView 的某些部分。我知道在实现静态 UITableViews 时这很容易完成(参见图片),但我在 Swift 中以编程方式添加页脚文本时遇到困难。

Footer text added to a static UITableViewSection

我知道如何为每个部分添加标题。

最佳答案

func tableView(_ tableView: UITableView, titleForFooterInSection 部分: Int) -> 字符串?

关于ios - UITableView 部分页脚文本与 Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38486355/

相关文章:

ios - UISwitch 未根据值正确设置

ios - 在 UITableView 中的 UITableViewCells 之间切换

swift - 为什么 self 与 init 一起使用而不是 color

ios - 当我单击 Objective C 中的按钮时,为什么未从 tableViewCell 获取文本字段数据?

ios - ScrollsToTop 功能在 iOS9 中无法正常工作

ios - 带 subview 的动态宽度 View

swift - swift 追加使用

ios - 我的球在我的 iPhone 上反弹得比在我的模拟器 swift spritekit 上高

ios - 当你有多个按钮时,如何在 UITableView 中保持 UIButton 状态被选中?

ios - UISearchDisplayController 不会触发 didSelectRowAtIndexPath