Custom tableviewcell width is always 320

Hi guys,

I tried to implement a custom tableviewcell, but Found its width is always set to 320 while the tableview width is 414, I wonder why that happens and how to fix it? (By fixing, I mean the cell automatically sizes to tableview width)

Thanks in adcance!

PS: I didn’t use storyboard, I program cell and tableview

@jiang Thanks very much for your question!

Here is a tutorial on our site that I think shows you how to solve your problem :slight_smile:

I hope this helps!

All the best!

This topic was automatically closed after 166 days. New replies are no longer allowed.