Jam*_*mes 2 cocoa-touch uitableview ios
我为表视图提供页脚标题,如下所示:
override func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String? {
return "DEVELOPED BY COMPANY NAME\nIN COMPANY LOCATION"
}
Run Code Online (Sandbox Code Playgroud)
当我运行代码时,页脚中仅显示“DEVELOPED BY COMPANY NAME”,并且换行符之外的文本无处可见。我该如何确保所有文字都能被看到?
小智 5
如果它符合您的设计,您可以在 Interface Builder 中更改为分组表格样式。
分组样式默认提供多行页脚。只需覆盖func tableView(_ tableView: UITableView, titleForFooterInSection section: Int) -> String?
就是这样。无需额外的视图或提供高度。
| 归档时间: |
|
| 查看次数: |
1893 次 |
| 最近记录: |