Is it possible to have differing heights in a UITableView Cell when I use several different ways of displaying the cell?

后端 未结 11 1298
一整个雨季
一整个雨季 2020-12-21 19:25

I\'ve spent several days trying to figure this out, but there doesn\'t seem to be a solution. I have a very basic UITableView cell with two labels in it. One of them will be

11条回答
  •  一整个雨季
    2020-12-21 20:18

    This is very easy.lets go step by step.

    1. set the estimatedRowHeight of table view.It makes easy and fast to load the cell.

    2.set the rowHeight property of tableview as UITableViewAutomaticDimension.and don't use heightForRowAtIndexPath.

    3.put the all top bottom leading and trailing constraint on both Label.its important.

    Lets rock and roll no need to use stackView

提交回复
热议问题