The stackView has constraints for leading, trailing and bottom.
What you describe here could very well be the issue — every view’s constraints must be unambiguous. Otherwise, runtime behaviour could be unpredictable. For example, if you were creating a plain rectangular view, you could:
Give it an explicit width, height, x, and y positions, or
Constrain it to the top, bottom, leading, and trailing edges of the superview.
Either one of these options fully define its size. (And a quick note, the latter is often preferable because it allows the view to scale when its content changes — for example, if the user has enabled accessibility options such as Dynamic Text or is running the app in a UI language other than English.)
Now, imagine your plain rectangle is defined by with constraints relative to its superview (the second option above). What if you were to remove the constraint at the top? What would happen? How tall is the view? It could be super tall beyond the top of the device’s canvas, or it could be super short.
So I think you may just need to add a constraint from the the top of the stack view to its parent.
However, I could be wrong, since I can’t see the app. You can try and confirm your theory in a few ways:
At runtime, do you see any error messages in the Xcode console about ambiguous constraints?
If you take a look in the view debugger, does the stack view actually have a height of zero, or is something else going on?
Debugging Auto Layout in the Auto Layout Guide could be helpful here, as well as
Debugging View Hierarchies.