iOS - Custom table cell not full width of UITableView

后端 未结 4 1794
误落风尘
误落风尘 2020-12-10 15:32

I may be going about this wrong. So I have created a UITableView that essentially has a auto-layout trailing space set to the main view. I am creating a custom cell for this

相关标签:
4条回答
  • 2020-12-10 16:07

    Can you post the code please .

    Did you enable the Use Auto layout and Use Size Classes as below do that first in both table view and table view cell .and tell me your problem

    enter image description here

    1)After that select both image and label and do as below

    enter image description here

    2) Select the image and do below

    enter image description here

    3) select the label an do the following

    enter image description here

    Can you check the link below:

    Table cell content(title) moving left after selecting cell

    0 讨论(0)
  • 2020-12-10 16:07

    select your table view cell's connection inspector and check if you haven't connected editingAccessoryView by mistake

    0 讨论(0)
  • 2020-12-10 16:23

    Instead of "filling", auto layout constraints to leading and trailing space to constant 0 and make sure they're not relative to margins.

    0 讨论(0)
  • 2020-12-10 16:25

    For those that are still having a similar issue and the above fixes are not working, make sure to set Estimated Size of the cell to None. This can be done in the Storyboard Size Inspector. Was stuck for much to long on this one!

    0 讨论(0)
提交回复
热议问题