UINavigtionController as a child view leaves an unwanted gap

I have a situation where I need to add a UINavigationController as a child view controller within another view controller. When I do this, there is a gap between the bottom of the navigation controller's root view controller and the bottom of the navigation controller's own view. This happens even though I am constraining the navigation controller's view to the edges of its superview, not the safe areas.

I'd really like to eliminate this gap, but nothing I have tried is working.

Can you show us a minimum reproducible example? Please format your code correctly in your post using the formatting tools.

Also, please add a screenshot so we can see what it is you want to fix. It's a little difficult interpreting what someone wants. A picture says a thousand words, etc.

UINavigtionController as a child view leaves an unwanted gap
 
 
Q