Swift, Auto Resize Custom Table View Cells

前端 未结 4 947
走了就别回头了
走了就别回头了 2020-12-17 06:14

In my app, I have a table view with an image, label and text view in each cell. I would like to be able to auto-resize the cells depending on the amount of content in the te

4条回答
  •  猫巷女王i
    2020-12-17 07:05

    Update for swift 4.2

    Use:

    UITableView.automaticDimension
    

    Instead of:

    UITableViewAutomaticDimension
    

提交回复
热议问题