UITableView dynamic cell heights only correct after some scrolling

后端 未结 24 1282
误落风尘
误落风尘 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条回答
  •  情书的邮戳
    2020-11-29 17:18

    I tried all of the solutions in this page but unchecking use size classes then checking it again solved my problem.

    Edit: Unchecking size classes causes a lot of problems on storyboard so I tried another solution. I populated my table view in my view controller's viewDidLoad and viewWillAppear methods. This solved my problem.

提交回复
热议问题