Unable to make view equal width to cell in iOS?

后端 未结 3 560
时光说笑
时光说笑 2020-12-19 17:35

I am making a custom cell in iOS.I have added prototype cell.I m trying to add a view inside a cell of equal width to parent cell.But the width of cell is not equal please t

3条回答
  •  时光取名叫无心
    2020-12-19 18:17

    You should add constraints to the view you added to the cell's content view,just like this.

    Tips: It seems like the tableview don't have the correct size so the cell can't be right.You can try add the constraints to the tableview in the same way. Hope helps.

提交回复
热议问题