I am using a UIStackView within a UIScrollView and I want to determine the height of the stack view so I can programmatically adjust the height of the scrollview to accomodate when subviews are hidden.
I am using
stackView.frame.height
to determine stack view height. This is called in viewDidLoad()
but it is always the same height value from the storyboard no matter if subviews are hidden or not.
How do I determine height?
viewDidLoad
is too soon. TryviewDidAppear
. – Theatrics