The view hierarchy is simple:
Scroll view (UIScrollView)
- Content View (UIView)
- Stack View
- Hello (UILabel)
- White view (UIView)
As shown below:
As you see above, the Stack View consists of only two components the Hello (UILabel) and White view (UIView).
What I am encountering is, if I don't embed these two components into a Stack View, running it on device I can see both the "Hello" UIlabel and the white view.
BUT, After I embedded them inside a vertical Stack View, I can only see the "Hello" (UILabel), the white UIView disappear, no matter what constraints I added or removed, no matter how I adjust stack view attribute, it just doesn't show, I always end up with following on device (though everything shows fine on storyboard):
Why?
=== more info ===
In View Hierarchy Debugger of xcode I see Scroll View-->Content View--> Stack View--> the UILabel, I don't see the white view. I don't understand why