tableview cell how do we resize cell in swift along with image and label

后端 未结 3 572
执笔经年
执笔经年 2020-12-02 03:00

when we have a lable and image in tableview cell how do we resize cell in swift or lable as per the text in the Last cell(in picture) there are some more lines of text bu

3条回答
  •  攒了一身酷
    2020-12-02 03:27

    1. set top,bottom,leading,trailing constraints for your label
    2. set Attribute Inspector->lines to 0
    3. set tableview.rowHeight = UITableViewAutomaticDimension in viewDidLoad() method

提交回复
热议问题