How to display tableview section headers with long text in multiple rows?

后端 未结 2 2108
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 14:49

I am using a table view controller that has multiple sections, with a few sections having long text. When I use titleForHeaderSection, text is getting truncated if length of the

2条回答
  •  庸人自扰
    2021-01-21 15:28

    You can use viewForHeaderInSection to create headerView. Add UILabel as subview to headerView. Use multi-line property of UILabel to display your text in multiple lines. Also set the height of headerView.

提交回复
热议问题