小编Jam*_*mes的帖子

如何在 UITableView 的页脚标题中使用换行符?

我为表视图提供页脚标题,如下所示:

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”,并且换行符之外的文本无处可见。我该如何确保所有文字都能被看到?

cocoa-touch uitableview ios

2
推荐指数
1
解决办法
1893
查看次数

标签 统计

cocoa-touch ×1

ios ×1

uitableview ×1