UITableView dynamic cell heights only correct after some scrolling

后端 未结 24 1281
误落风尘
误落风尘 2020-11-29 16:41

I have a UITableView with a custom UITableViewCell defined in a storyboard using auto layout. The cell has several multiline UILabels.

24条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 17:30

    Just make sure you're not setting the label text in 'willdisplaycell' delegate method of table view. Set the label text in 'cellForRowAtindexPath' delegate method for dynamic height calculation.

    You're Welcome :)

提交回复
热议问题