Table View Cell Row Height doesnt work

Agung Laksana picture Agung Laksana · Oct 2, 2017 · Viewed 27.9k times · Source

enter image description here

I have tried to hard code the row height in the table view cell. After running the program it looks like only one line. I suspect it is because of the height of the row of the table view.

Could you please tell me what went wrong in here?

Answer

Irfan picture Irfan · Oct 2, 2017

In Xcode 9, tableview automatically create estimated cells based on Autolayout. Since you have not provide autolayout, that's why you are getting this.

You need to disable estimated and automatic cell size by selecting tableview and uncheck the two options:

enter image description here

Give value you want to Row height, and cell will be created accordingly.

Hope this can help.