Table view is not shown in the simulator

I used the storyboard and horizontal and vertical stack views to generate a good looking App. This worked fine, but one view does not show the Table View I placed there. In the storyboard everything is fine and no warning is shown. I tried to remove the Table View and renew it, but that did not fix the problem. Has anybody an idea what I missed ?
Answered by Claude31 in 665855022
Have you set constraints to position the tableView ?

You should, it may just be offscreen.

Have you populated the tableView with content ?
You need to define the required dataSource and delegate func for the tableView. And make sure delegate and datasource are properly set.
Otherwise, an empty tableView shows nothing.

To better see what happens, select tableView in IB ; in Attributes Inspector, set its view bg color to red.
And check if you see something.
Accepted Answer
Have you set constraints to position the tableView ?

You should, it may just be offscreen.

Have you populated the tableView with content ?
You need to define the required dataSource and delegate func for the tableView. And make sure delegate and datasource are properly set.
Otherwise, an empty tableView shows nothing.

To better see what happens, select tableView in IB ; in Attributes Inspector, set its view bg color to red.
And check if you see something.
The content of the table was not the problem. The stack view set the height of the table to 0, I do not know why, I changed the distribution from Fill proportionally to equal centering, then I added some constraints where needed and it worked. Thank you

I can't show it either. I just added tableview from UITableView and define to viewcontroller. just want to run and see empty list but table view does not appear. There is blank white screen on the simulator. (Added zero to the all way constraint and I did reset to suggested constraint)

Table view is not shown in the simulator
 
 
Q