Here is my view hierarchy
-- UIStackView --- UIScrollView -- UIImageView
StackView distribution is set to .FillProportionally but this not working since the UIScrollView doesn't have intrinsic content size.
So my question is since the UIIMageView has intrinsic content size, is there any way for me to pass that content size to UIScrollView so the StackView can show the proper size for the view.
I already tried setting the contentSize of scrollView based on width and height of the UIImageView but doesn't seem to be working either.
I am also not sure where to set the constraint if that that is an alternative approach, I need to have a dynamic size for the ScrollView based on the contentSize of ImageView so a fixed constraint won't help either.
I should also point out the reason for having the ImageView as subview of scrollView is to be able to resize ImageView inside StackView