Dynamic Height Issue for UITableView Cells (Swift)

前端 未结 25 2642
温柔的废话
温柔的废话 2020-11-28 04:39

Dynamic text of variable length are being injected into tableview cell labels. In order for the tableview cells\' heights to be dynamically sized, I have implemented in

25条回答
  •  囚心锁ツ
    2020-11-28 04:48

    I was just inspired by your solution and tried another way.

    Please try to add tableView.reloadData() to viewDidAppear().

    This works for me.

    I think the things behind scrolling is "the same" as reloadData. When you scroll the screen, it's like calling reloadData() when viewDidAppear .

    If this works, plz reply this answer so I could be sure of this solution.

提交回复
热议问题