My goal is to use
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 112.0
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat
I think your constraints are ambiguous. You are asking UIKit to automatically size your cell (
UITableViewAutomaticDimension), but the "Foreground Container View" does not have a defined height...it is only constrained to the cell itself (which also doesn't have a defined height!).
So you probably have some kind of ambiguous constraint warning in the console since the system doesn't know what to do, or it's possible your "Foreground Container View" is defaulting to a height of 0.0 meaning your table cell height is about 10.5 (0.0 + your constrained spacing). You didn't include a screenshot of what actually shows in the simulator, so I'm just guessing.
Give your "Foreground Container View" some content or explicitly constrain it's height to something you will be able to see (ex. 200px). Also I recommend you give it a background color so you can actually see it's height on your screen.
To get automatic cell sizing with actual cell content, you should constrain views (labels, images, whatever else) inside your "Foreground Container View" (or if you want, inside the cell's content view directly).
There must be both a top spacing and bottom spacing constraint between the anticipated tallest subviews (labels, images, etc.) and the container.